correcciones y nueva base
This commit is contained in:
@@ -6,6 +6,7 @@ const entradaInvitado = async (body) => {
|
||||
|
||||
const profesor = await Profesor.findOne({ where: idProfesor });
|
||||
if (!profesor) throw new Error('Este profesor no existe');
|
||||
if (!profesor.noInvitados) throw new Error('Este profesor no registró a ninún invitado.')
|
||||
let noInvDentro = profesor.dataValues.numeroInvitadosDentro;
|
||||
let noInv = profesor.dataValues.numeroInvitados;
|
||||
if (noInvDentro && noInvDentro >= noInv)
|
||||
|
||||
Reference in New Issue
Block a user