@munlib/common 1.0.119 → 1.0.120
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.
|
@@ -30,6 +30,7 @@ var RequestValidationError = /** @class */ (function (_super) {
|
|
|
30
30
|
}
|
|
31
31
|
RequestValidationError.prototype.serializeErrors = function () {
|
|
32
32
|
var _this = this;
|
|
33
|
+
console.log("22222222", this.errors);
|
|
33
34
|
return this.errors.map(function (err) {
|
|
34
35
|
return { status: erroresStatus_1.ErrorController.getGeneralStatus(_this.statusCode.toString()), msg: err.msg, field: err.param };
|
|
35
36
|
});
|
|
@@ -6,6 +6,7 @@ var request_validation_error_1 = require("../errors/request-validation-error");
|
|
|
6
6
|
var validateRequest = function (req, res, next) {
|
|
7
7
|
var errors = (0, express_validator_1.validationResult)(req);
|
|
8
8
|
if (!errors.isEmpty()) {
|
|
9
|
+
console.log("111111111", errors);
|
|
9
10
|
throw new request_validation_error_1.RequestValidationError(errors.array());
|
|
10
11
|
}
|
|
11
12
|
next();
|