sef-global / scholarx-backend

This is the backend of the ScholarX
MIT License
10 stars 37 forks source link

Implement Get mentor by id endpoint (Public endpoint) #65

Closed Madhawa97 closed 11 months ago

Madhawa97 commented 11 months ago

Purpose

The purpose of this PR is to fix #15

Goals

This issue involves implementing an API to get mentors by id. The endpoint should allow clients to make a GET request to {{baseUrl}}/api/mentors/{{mentorId}}.

{
    "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"
    },
    "mentees": []
}

Approach

Checklist

Related PRs

Test environment

macOS 13 latest, local Postgres 15 env.
Madhawa97 commented 11 months ago

Please verify if the request URL is {{baseUrl}}/api/mentors/{{mentorId}}. Currently, I've used that. It has given as {{baseUrl}}/api/mentees/mentors/{{mentorId}} in the API documentation. cc: @anjula-sack @janithlahirukariyawasam

anjula-sack commented 11 months ago

Please verify if the request URL is {{baseUrl}}/api/mentors/{{mentorId}}. Currently, I've used that. It has given as {{baseUrl}}/api/mentees/mentors/{{mentorId}} in the API documentation. cc: @anjula-sack @janithlahirukariyawasam

Sorry, my bad. I updated the doc. It's {{baseUrl}}/api/mentors/{{mentorId}}

Madhawa97 commented 11 months ago

Thank you @anjula-sack.

Madhawa97 commented 11 months ago

Fixed merge conflicts with #9.