sef-global / scholarx-backend

This is the backend of the ScholarX
MIT License
11 stars 39 forks source link

Implement Get a specific mentors’ details endpoint (Admin) #29

Closed janithlahirukariyawasam closed 5 months ago

janithlahirukariyawasam commented 1 year ago

Description: This issue involves implementing an API to get all mentors. The endpoint should allow Admin to make a GET request to {{baseUrl}}/api/admin/mentors/{{mentorId}}.

{
    "mentor_id": 1,
    "created_at": "2023-06-30T10:00:00Z",
    "updated_at": "2023-06-30T14:30:00Z",
    "state": "active",
    "category": "Technology",
    "application": {
        "field1": "value1",
        "field2": "value2"
    },
    "availability": true,
    "profile": {
        "created_at": "2023-06-29T09:15:00Z",
        "updated_at": "2023-06-30T16:45:00Z",
        "primary_email": "mentor@example.com",
        "contact_email": "mentor_contact@example.com",
        "first_name": "John",
        "last_name": "Doe",
        "image_url": "https://example.com/mentor_profile_image.jpg",
        "linkedin_url": "https://www.linkedin.com/in/johndoe",
        "type": "DEFAULT",
        "uuid": "12345678-1234-5678-1234-567812345678"
    }
}

Tasks:

  1. Create a controller for the /controllers/mentor endpoint in the backend (create the route mentor if not created).
  2. Parse and validate the request body to ensure it matches the expected format.
  3. Implement appropriate error handling and response status codes for different scenarios (e.g., validation errors, database errors).
  4. Write unit tests to validate the functionality and correctness of the endpoint.

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:

Additional Information: No

Related Dependencies or References: No

subhashree9898 commented 1 year ago

@janithlahirukariyawasam @anjula-sack Please assign this issue to me!

anjula-sack commented 1 year ago

@janithlahirukariyawasam @anjula-sack Please assign this issue to me!

Go ahead @subhashree9898

anjula-sack commented 1 year ago

@subhashree9898 Are you working on this?

anjula-sack commented 5 months ago

Implemented with https://github.com/sef-global/scholarx-backend/pull/111