actualizar al desctivar

This commit is contained in:
Lemuel Marquez
2021-06-17 09:04:13 -05:00
parent 50ad3074c1
commit 29ecb363ed
+2
View File
@@ -67,6 +67,8 @@ const status = async (body) => {
{ where: { idEquipo: res.Equipo.idEquipo } }
);
await Prestamo.update({ activo: false }, { where: { idPrestamo } });
res.Equipo.apartado = false;
res.activo = false;
return {
message:
'Ya paso el tiempo limite para recoger el dispositivo. Se ha cancelado tu prestamo.',