Skip to content
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 the mentor availability endpoint #9

Closed
anjula-sack opened this issue Jul 15, 2023 · 1 comment
Closed

Implement the mentor availability endpoint #9

anjula-sack opened this issue Jul 15, 2023 · 1 comment
Assignees
Labels
backend A backend task priority: medium Medium priority task

Comments

@anjula-sack
Copy link
Member

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

  • The Mentor API endpoint /controllers/mentors is implemented and accessible via a PUT request.
  • The request body is properly parsed and validated for the required format.
  • The mentor's availability is stored correctly in the database or data store.
  • Appropriate error handling is implemented, providing meaningful error messages and correct response status codes.
  • Unit tests are written to validate the functionality and correctness of the endpoint.
@anjula-sack anjula-sack converted this from a draft issue Jul 15, 2023
@anjula-sack anjula-sack added backend A backend task priority: medium Medium priority task labels Jul 15, 2023
@anjula-sack anjula-sack moved this to Groomed in ScholarX Jul 15, 2023
@anjula-sack anjula-sack added this to the Mentor Functionalities milestone Aug 13, 2023
@Shrenik0321 Shrenik0321 self-assigned this Sep 10, 2023
@anjula-sack anjula-sack moved this from Groomed to Done in ScholarX Sep 23, 2023
@anjula-sack
Copy link
Member Author

#64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend A backend task priority: medium Medium priority task
Projects
Status: Done
Development

No branches or pull requests

2 participants