updated BE file naming convention

This commit is contained in:
subnub
2024-08-10 01:54:22 -04:00
parent 9a97489e0e
commit 831dc78bf5
70 changed files with 163 additions and 174 deletions
@@ -0,0 +1,15 @@
import { NextFunction } from "express";
import { validationResult } from "express-validator";
import { Request, Response } from "express";
export const middlewareValidationFunction = (
req: Request,
res: Response,
next: NextFunction
) => {
const errors = validationResult(req);
if (!errors.isEmpty()) {
return res.status(400).json({ errors: errors.array() });
}
next();
};