refactor: delete several events

This commit is contained in:
Carlos Valente
2024-05-24 11:38:54 +02:00
committed by Carlos Valente
parent 16f31a07b7
commit a09aa922bb
14 changed files with 84 additions and 35 deletions
@@ -64,3 +64,14 @@ export const paramsMustHaveEventId = [
next();
},
];
export const rundownArrayOfIds = [
body('ids').isArray().exists(),
body('ids.*').isString(),
(req: Request, res: Response, next: NextFunction) => {
const errors = validationResult(req);
if (!errors.isEmpty()) return res.status(422).json({ errors: errors.array() });
next();
},
];