meh
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user