diff --git a/src/services/admin/mentor.service.ts b/src/services/admin/mentor.service.ts index c078b2d..8d2fcec 100644 --- a/src/services/admin/mentor.service.ts +++ b/src/services/admin/mentor.service.ts @@ -182,7 +182,7 @@ export const getAllMentors = async ({ const [mentors, count] = await mentorRepository.findAndCount({ where: status ? { state: status } : {}, - relations: ['profile', 'category'], + relations: ['profile', 'category', 'country'], skip: (pageNumber - 1) * pageSize, take: pageSize }) @@ -257,7 +257,7 @@ export const getMentor = async ( const mentor = await mentorRepository.findOne({ where: { uuid: mentorId }, - relations: ['profile', 'category'] + relations: ['profile', 'category', 'country'] }) if (!mentor) { diff --git a/src/services/mentor.service.ts b/src/services/mentor.service.ts index bded9c3..e703c94 100644 --- a/src/services/mentor.service.ts +++ b/src/services/mentor.service.ts @@ -174,7 +174,13 @@ export const getMentor = async ( const mentorRepository = dataSource.getRepository(Mentor) const mentor = await mentorRepository.findOne({ where: { uuid: mentorId }, - relations: ['profile', 'category', 'mentees', 'mentees.profile'], + relations: [ + 'profile', + 'category', + 'mentees', + 'mentees.profile', + 'country' + ], select: ['application', 'uuid', 'availability'] }) @@ -256,7 +262,13 @@ export const getAllMentors = async ({ state: MentorApplicationStatus.APPROVED } : { state: MentorApplicationStatus.APPROVED }, - relations: ['profile', 'category', 'mentees', 'mentees.profile'], + relations: [ + 'profile', + 'category', + 'mentees', + 'mentees.profile', + 'country' + ], select: ['application', 'uuid', 'availability'], order: { availability: 'DESC'