From c12338410f35ff9b7eb8df8361e3f4aaef39bae7 Mon Sep 17 00:00:00 2001 From: AntoXa PRO Date: Wed, 20 Sep 2023 13:35:31 +0300 Subject: [PATCH] fast fix --- package.json | 2 +- src/core/handlers.ts | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) 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) - } - }