@sn1006/common 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { NextFunction, Request, Response } from "express";
|
|
2
2
|
import Joi from "joi";
|
|
3
|
-
|
|
3
|
+
declare function joiValidateRequest(schema: Joi.AnySchema, options?: Joi.ValidationOptions): (req: Request, res: Response, next: NextFunction) => any;
|
|
4
|
+
export { joiValidateRequest };
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.joiValidateRequest = void 0;
|
|
6
7
|
const validation_error_1 = __importDefault(require("../errors/validation-error"));
|
|
7
8
|
function joiValidateRequest(schema, options) {
|
|
8
9
|
return (req, res, next) => {
|
|
@@ -15,4 +16,4 @@ function joiValidateRequest(schema, options) {
|
|
|
15
16
|
return next();
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
|
-
exports.
|
|
19
|
+
exports.joiValidateRequest = joiValidateRequest;
|