todo listo para pruebas
This commit is contained in:
@@ -21,9 +21,9 @@ const pasarLista = async (body) => {
|
||||
if (!res) throw new Error('No existe este alumno.');
|
||||
horario = moment(res.Horario.horario);
|
||||
if (res.asistio) throw new Error('Ya paso lista a este alumno.');
|
||||
if (ahora < horario) throw new Error('Aun no es la hora del recorrido.');
|
||||
if (ahora <= horario) throw new Error('Aun no es la hora del recorrido.');
|
||||
horario.add(20, 'm');
|
||||
if (ahora > horario) throw new Error('Ya paso la hora del recorrido.');
|
||||
if (ahora >= horario) throw new Error('Ya paso la hora del recorrido.');
|
||||
return Alumno.update({ asistio: true }, { where: { idAlumno } });
|
||||
})
|
||||
.then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user