sin horario

This commit is contained in:
xXpuma99Xx
2022-02-22 21:35:07 -06:00
parent 48d882bbd2
commit 9741afc8ae
2 changed files with 8 additions and 7 deletions
+4 -4
View File
@@ -34,10 +34,10 @@ const pedir = async (body) => {
throw new Error(
'No se puede pedir un equipo de cómputo los días sabados y domingos.'
);
if (ahora > horaMax)
throw new Error('Ya no se puede realizar un préstamo el día de hoy.');
if (ahora < horaMin)
throw new Error('Aún es muy temprano para realizar un préstamo.');
// if (ahora > horaMax)
// throw new Error('Ya no se puede realizar un préstamo el día de hoy.');
// if (ahora < horaMin)
// throw new Error('Aún es muy temprano para realizar un préstamo.');
return TipoCarrito.findOne({ where: { idTipoCarrito } })
.then((res) => {
if (!res) throw new Error('No existe este tipo de equipo.');