Description:
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}}.
[
{
"mentorId": 2,
"category": "Computer Science",
"profile": {
"contact_email": "thomas@gmail.com",
"first_name": "Thomas",
"last_name": "Daniel",
"image_url": "https://www.linkedin.com/thomas",
"linkedin_url": "https://www.linkedin.com/thomas"
},
"appilcation": {
"position": "Software Engineer",
"bio": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"additonalLinks": [
"https://www.linkedin.com",
"https://www.google_scholar.com"
],
"slots": 10
}
},
{
"mentorId": 5,
"category": "Computer Science",
"profile": {
"contact_email": "mandy@gmail.com",
"first_name": "Mandy",
"last_name": "Fernando",
"image_url": "https://www.linkedin.com/mandy",
"linkedin_url": "https://www.linkedin.com/mandy"
},
"appilcation": {
"position": "Senior Software Engineer",
"bio": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"additonalLinks": [
"https://www.linkedin.com",
"https://www.google_scholar.com"
],
"slots": 10
}
}
]
Tasks:
Create a controller for the /controllers/mentor endpoint in the backend (create the route mentor if not created).
Parse and validate the request body to ensure it matches the expected format.
Implement appropriate error handling and response status codes for different scenarios (e.g., validation errors, database errors).
Write unit tests to validate the functionality and correctness of the endpoint.
Description: 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}}
.Tasks:
/controllers/mentor
endpoint in the backend (create the route mentor if not created).API documentation: https://documenter.getpostman.com/view/27421496/2s93m1a4ac#8744a3ee-970f-489a-853d-8b23fdee8de3
ER diagram: https://drive.google.com/file/d/11KMgdNu2mSAm0Ner8UsSPQpZJS8QNqYc/view
Acceptance Criteria:
/controllers/mentor
is implemented via a GET request.Additional Information: No
Related Dependencies or References: No