-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Get mentors by category endpoint (Admin) #26 #76
Conversation
This reverts commit e2416f6.
@anjula-sack please review this |
src/services/admin/mentor.service.ts
Outdated
.select([ | ||
'mentor.uuid', | ||
'category.category', | ||
'mentor.application', | ||
'profile.contact_email', | ||
'profile.first_name', | ||
'profile.last_name', | ||
'profile.image_url', | ||
'profile.linkedin_url' | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without selecting fields, what does it return? @sathudeva7 Also can you drop a comment on the issue and get assigned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the mistake could you please assign me to this issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sathudeva7 Can you drop a comment on the issue then I will assign you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sathudeva7 Can you update it to without selecting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any updates @sathudeva7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will update within this week
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any updates @sathudeva7?
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