diff --git a/src/Profesor/profesor.service.ts b/src/Profesor/profesor.service.ts index 87eaebc..6c7c708 100644 --- a/src/Profesor/profesor.service.ts +++ b/src/Profesor/profesor.service.ts @@ -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); }