Se agrego la opcion de obtener el periodo en automatico
This commit is contained in:
@@ -79,6 +79,19 @@ async function realizarInscripcion(req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
// // Validacion del periodo
|
||||
// const periodoActivo = await Periodo.findOne({
|
||||
// where: {
|
||||
// activo: 1 // o true
|
||||
// }
|
||||
// });
|
||||
|
||||
// if (!periodoActivo) {
|
||||
// throw new Error("No hay un periodo activo");
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// 3. Crear inscripción
|
||||
console.log('Creando nueva inscripción...');
|
||||
const nuevaInscripcion = await AlumnoInscrito.create({
|
||||
|
||||
Reference in New Issue
Block a user