added new Ep

This commit is contained in:
2025-10-08 15:45:21 -06:00
parent 3cdaf3c690
commit 24d2c7bba8
12 changed files with 90 additions and 57 deletions
+12
View File
@@ -41,6 +41,18 @@ export class AlumnoService {
return student;
}
async findOneByName(nombre: string): Promise<Alumno> {
const student = await this.studentRepository.findOne({
where: { nombre },
});
if (!student) {
throw new NotFoundException(`Student not found`);
}
return student;
}
async GetCredit(id_cuenta: number): Promise<Alumno['credito']> {
const student = await this.findOne(id_cuenta);
return student.credito;