Api fix 2

This commit is contained in:
TioSam77
2024-06-25 22:28:37 -06:00
+5 -1
View File
@@ -161,7 +161,11 @@ export class ProfesorService {
//brings teachers by id
async profile(id_profesor: number) {
const profesor = await this.profesorRepository.findOne({ where: { id_profesor } });
const profesor = await this.profesorRepository.findOne({
where: { id_profesor },
relations: ['proyectosAcademicos', 'datosAcademicos', 'lineasInvestigacion'],
});
if (!profesor) {
throw new HttpException('Profesor not found', 404);
}