let verificaAdmin_Role = (req, res, next) => {
let usuario = req.usuario;
if (usuario.role === 'ADMIN_ROLE') {
next();
} else {
return res.status(409).json({
ok: false,
err: {
message: 'El usuario no es administrador.'
}
})
}
};
He's our company CTO, with 25+ years of experience. Author https://github.com/juang77"