error merge

This commit is contained in:
xXpuma99Xx
2021-12-31 19:35:03 -06:00
3 changed files with 66 additions and 6 deletions
+2 -1
View File
@@ -16,12 +16,13 @@ const admin = async (body) => {
{ model: Usuario, include: [{ model: TipoUsuario }] },
{ model: Carrera },
{ model: Status },
{ model: Programa },
{ model: Programa, include: [{ model: Usuario }] },
],
}).then((res) => {
if (!res) throw new Error('No existe este servicio social.');
delete res.dataValues.Usuario.dataValues.password;
delete res.dataValues.Programa.dataValues.idUsuario;
delete res.dataValues.Programa.dataValues.Usuario.dataValues.password;
delete res.dataValues.idUsuario;
delete res.dataValues.idCarrera;
delete res.dataValues.idStatus;