error
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user