Closed sathudeva7 closed 3 months ago
The purpose of this PR is to fix #26
This issue involves implementing an API to get mentors by category. The endpoint should allow Admin to make a GET request to {{baseUrl}}/api/admin/mentors?category={{category}}.
const mentors: Mentor[] = await mentorRepository .createQueryBuilder('mentor') .innerJoinAndSelect('mentor.category', 'category') .leftJoinAndSelect('mentor.profile', 'profile') .select([ 'mentor.uuid', 'category.category', 'mentor.application', 'profile.contact_email', 'profile.first_name', 'profile.last_name', 'profile.image_url', 'profile.linkedin_url' ]) .where('category.category ILIKE :name', { name: categoryQuery }) .getMany()
@anjula-sack please review this
Closing due to inactivity
Purpose
The purpose of this PR is to fix #26
Goals
This issue involves implementing an API to get mentors by category. The endpoint should allow Admin to make a GET request to {{baseUrl}}/api/admin/mentors?category={{category}}.
Approach
const mentors: Mentor[] = await mentorRepository .createQueryBuilder('mentor') .innerJoinAndSelect('mentor.category', 'category') .leftJoinAndSelect('mentor.profile', 'profile') .select([ 'mentor.uuid', 'category.category', 'mentor.application', 'profile.contact_email', 'profile.first_name', 'profile.last_name', 'profile.image_url', 'profile.linkedin_url' ]) .where('category.category ILIKE :name', { name: categoryQuery }) .getMany()
Screenshots
Checklist
Related PRs
## Test environment ## Learning