This commit is contained in:
xXpuma99Xx
2021-10-24 20:20:04 -05:00
parent 72d26616a1
commit e960e3fd72
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -11,6 +11,8 @@ const get = async (body) => {
include: [{ model: Carrera }],
}).then((res) => {
if (!res) throw new Error('No existe este número de cuenta.');
if (res.idHorario)
throw new Error('Este alumno ya cuenta con un horario asignado.');
delete res.dataValues.idCarrera;
return res;
});
+4 -1
View File
@@ -51,7 +51,10 @@ const registrar = async (body) => {
correo.message
);
})
.then((res) => ({ message: 'Se registro correctamente tu horario.' }));
.then((res) => ({
message:
'Se registro correctamente tu horario. Se envio una comprobante a tu correo pcpuma.',
}));
};
module.exports = registrar;