listo equipos consecutivos

This commit is contained in:
xXpuma99Xx
2022-02-22 15:16:46 -06:00
parent ee27a9db64
commit 48d882bbd2
3 changed files with 50 additions and 4 deletions
+4 -1
View File
@@ -53,7 +53,10 @@ const entregar = async (body) => {
if (ahora > moment(`${ahora.format('YYYY-MM-DD')} 17:45`))
update.horaFin = moment(`${ahora.format('YYYY-MM-DD')} 19:45`);
else update.horaFin = ahora.add(2, 'h').format();
return Equipo.update({ idStatus: 2 }, { where: { idEquipo } });
return Equipo.update(
{ idStatus: 2, prestado: true },
{ where: { idEquipo } }
);
})
.then(() => Prestamo.update(update, { where: { idPrestamo } }))
.then(() =>