versión producción
This commit is contained in:
@@ -50,10 +50,9 @@ 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 } }
|
||||
|
||||
@@ -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.');
|
||||
|
||||
+4
-4
@@ -8,10 +8,10 @@ module.exports = {
|
||||
origin: [
|
||||
// 'http://localhost:3046',
|
||||
// 'http://localhost:3056',
|
||||
'http://132.248.80.196:3045',
|
||||
'http://132.248.80.196:3055',
|
||||
// 'https://pcpuma.acatlan.unam.mx',
|
||||
// 'https://pcpuma.acatlan.unam.mx:8080',
|
||||
// 'http://132.248.80.196:3045',
|
||||
// 'http://132.248.80.196:3055',
|
||||
'https://pcpuma.acatlan.unam.mx',
|
||||
'https://pcpuma.acatlan.unam.mx:8080',
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user