refactor: simplify validations

This commit is contained in:
Carlos Valente
2025-06-05 20:13:14 +02:00
committed by arc-alex
parent aebf949883
commit f3b4ea0155
9 changed files with 33 additions and 39 deletions
@@ -2,7 +2,7 @@ import { Request, Response, NextFunction } from 'express';
import { body, validationResult } from 'express-validator';
export const validatePostCss = [
body('css').exists().isString().trim(),
body('css').isString().trim(),
(req: Request, res: Response, next: NextFunction) => {
const errors = validationResult(req);