@mercury-labs/auth
Version:
Mercury framework auth library. It supports local auth, jwt with both bearer token and cookie, basic auth.
16 lines • 491 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateEntity = void 0;
const common_1 = require("@nestjs/common");
async function validateEntity(value, toEntity) {
const res = await new common_1.ValidationPipe({
transform: true,
whitelist: true,
}).transform(value, {
type: 'body',
metatype: toEntity,
});
return res;
}
exports.validateEntity = validateEntity;
//# sourceMappingURL=validate-entity.js.map
;