This commit is contained in:
Lemuel Marquez
2021-05-31 20:27:35 -05:00
parent b6d861d02e
commit 2f9ba8bbd1
@@ -26,6 +26,8 @@ const regresarNumeroInventario = async (body) => {
.then((res) => {
if (!res)
throw new Error('No existe un prestamo activo con este equipo.');
if (!res.Equipo.enUso)
throw new Error('Aun no se ha entregado el equipo al usuario.');
idPrestamo = res.idPrestamo;
return Equipo.update(
{ enUso: false, apartado: false },