sef-global / scholarx-backend

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

Implement the mentor availability endpoint #9

Closed anjula-sack closed 1 year ago

anjula-sack commented 1 year ago

Description

This issue involves implementing the Mentor availability API endpoint. The endpoint should allow clients to make a POST request to {{baseUrl}}/api/me/availability and provide availability in the request body. sample request body:

{
    "availability": true
}

Tasks

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

API documentation: https://documenter.getpostman.com/view/27421496/2s93m1a4ac#3eeb0372-4e07-4a2a-b72d-114d8639783d

ER diagram: https://drive.google.com/file/d/11KMgdNu2mSAm0Ner8UsSPQpZJS8QNqYc/view

Acceptance Criteria

anjula-sack commented 1 year ago

https://github.com/sef-global/scholarx-backend/pull/64