appolo
Version:
nodejs server framework
18 lines • 580 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
// export function checkValidationMiddleware(req: IRequest, res: IResponse, next: NextFn) {
// let data = _.extend({}, req.params, req.query, (req as any).body);
//
// joi.validate(data, req.route.validations, req.app.options.validatorOptions, function (e, params) {
//
// if (e) {
// return next(new BadRequestError(e.toString()));
//
// }
//
// req.model = params;
//
// next();
// });
// }
//# sourceMappingURL=~checkValidationMiddleware.js.map