api impresiones
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
const { validationResult } = require('express-validator');
|
||||
|
||||
module.exports = (req, res, next) => {
|
||||
const errors = validationResult(req);
|
||||
if (!errors.isEmpty()) {
|
||||
return res.status(400).json({ errors: errors.array() });
|
||||
}
|
||||
next();
|
||||
}
|
||||
Reference in New Issue
Block a user