diff --git a/server/controller/Prestamo/entregar.js b/server/controller/Prestamo/entregar.js index 983ed4d..d443f67 100644 --- a/server/controller/Prestamo/entregar.js +++ b/server/controller/Prestamo/entregar.js @@ -50,9 +50,10 @@ const entregar = async (body) => { 'Ya pasó el tiempo límite para recoger el equipo de cómputo.' ); }); - 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(); + // 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, prestado: true }, { where: { idEquipo } } diff --git a/server/controller/Prestamo/pedir.js b/server/controller/Prestamo/pedir.js index b486710..db1b6a8 100644 --- a/server/controller/Prestamo/pedir.js +++ b/server/controller/Prestamo/pedir.js @@ -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.');