correcciones y nueva base

This commit is contained in:
2022-05-13 17:23:10 -05:00
parent 71dce1f4fe
commit f9fa0ac0ca
5 changed files with 67 additions and 12 deletions
@@ -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)