diff --git a/package.json b/package.json index 0c48761..379ab7a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "axp-server", - "version": "1.4.13", + "version": "1.4.14", "description": "My helper library", "author": "AntoXa PRO ", "homepage": "https://antoxahub.ru/antoxa/axp-server", diff --git a/src/core/handlers.ts b/src/core/handlers.ts index 2d196d9..acb100b 100644 --- a/src/core/handlers.ts +++ b/src/core/handlers.ts @@ -94,16 +94,3 @@ export const zodMiddle = next(httpError) } } - -export const validFormMiddle = - (model: IFormModel) => - (req: Request, {}: Response, next: NextFunction) => { - if (model.isValid()) { - req.body = model.obj - next() - } else { - const httpError = new HttpError({ statusCode: 400 }) - httpError.errors = model.errors - next(httpError) - } - }