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