From c9fa7e01b57209576713b254e1498e00b4980e88 Mon Sep 17 00:00:00 2001 From: IO420 <320154041@pcpuma.acatlan.unam.mx> Date: Mon, 13 Oct 2025 17:41:57 -0600 Subject: [PATCH] added student --- src/alumno_sancion/alumno_sancion.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/alumno_sancion/alumno_sancion.service.ts b/src/alumno_sancion/alumno_sancion.service.ts index 8743910..681d3c3 100644 --- a/src/alumno_sancion/alumno_sancion.service.ts +++ b/src/alumno_sancion/alumno_sancion.service.ts @@ -34,7 +34,9 @@ export class AlumnoSancionService { return await this.alumnosancionRepository.save(alumnosancion); } - async findbyStudent(id_cuenta: number): Promise { + async findbyStudent(id_cuenta: number) { + const student = await this.alumnoService.findOne(id_cuenta); + const alusancion = await this.alumnosancionRepository.find({ where: { alumno: { id_cuenta } }, }); @@ -42,7 +44,7 @@ export class AlumnoSancionService { if (alusancion.length === 0) { throw new NotFoundException(`student without sancion`); } - return alusancion; + return { student, alusancion }; } async removeByStudent(id_cuenta: number): Promise<{ message: string }> {