querries traen solo lo que necesitan

This commit is contained in:
xXpuma99Xx
2022-01-17 18:28:01 -06:00
parent 5623c90bda
commit bc146595a9
10 changed files with 180 additions and 145 deletions
+1 -4
View File
@@ -6,10 +6,7 @@ const responsable = async (body) => {
return Usuario.findOne({
where: { idUsuario },
}).then((res) => {
delete res.dataValues.password;
delete res.dataValues.idTipoUsuario;
return res;
attributes: ['idUsuario', 'usuario', 'nombre', 'activo'],
});
};