traer a todos los responsables

This commit is contained in:
2020-11-19 12:23:39 -06:00
parent 9b748bc130
commit d5271cd086
5 changed files with 63 additions and 4 deletions
@@ -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,