Se agrego la opcion de obtener el periodo en automatico

This commit is contained in:
Patriots01
2026-08-04 11:05:07 -06:00
6 changed files with 1462 additions and 3075 deletions
@@ -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({