traer a todos los responsables
This commit is contained in:
@@ -22,7 +22,7 @@ const serviciosAdmin = async (body) => {
|
||||
return Usuario.findOne({ where: { idUsuario } })
|
||||
.then((res) => {
|
||||
if (!res) throw new Error('No existe este usuario.');
|
||||
if (res.idTipoUsuario != 1)
|
||||
if (res.idTipoUsuario !== 1)
|
||||
throw new Error('No es un usuario tipo admin.');
|
||||
return Servicio.findAll({
|
||||
where,
|
||||
|
||||
Reference in New Issue
Block a user