generated from ctc-uci/npo-template-merged
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Description
The task is to create CRUD (Create, Read, Update, Delete) API routes for the Language table and implement endpoints for managing the many-to-many relationships between languages and other entities through their respective intermediary tables:
Language table
POST /languages- create a languageGET /languages- get all languagesGET /languages/{id}- get a single languagePUT /languages/{id}- update a single languageDELETE /languages/{id}- delete a single language
Case-Language relationship
POST /cases/{caseId}/languages- assign a language to a caseDELETE /cases/{caseId}/languages/{languageId}- remove a language from a caseGET /cases/{caseId}/languages- list all languages for a case
Clinic-Language relationship
POST /clinics/{clinicId}/languages- assign a language to a clinicDELETE /clinics/{clinicId}/languages/{languageId}- remove a language from a clinicGET /clinics/{clinicId}/languages- list all languages for a clinic
Recommended Steps
- Git pull to fetch current changes and create a new branch.
- Review the Language table schema and all intermediary join tables.
- Create
languages.jsfile in/server/routes. - Implement CRUD routes for the Language table (Create, Read, Update, Delete).
- Implement nested routes for managing all Language relationships (assign, remove, list) for Case, Clinic, Workshop, and Volunteer.
- Implement validation and error handling for all routes.
- Test all routes thoroughly using Postman and take screenshots as proof of functionality.
Acceptance Criteria
- GET routes return all languages or a single record by ID.
- POST route creates a new language in the database.
- PUT route updates an existing language record.
- DELETE route removes the correct language from the database.
- POST routes assign a language to Case or Clinic entities correctly.
- DELETE routes remove a language from Case or Clinic entities correctly.
- GET routes list all languages associated with a specific Case or Clinic
- Error handling is implemented for all routes.
Resources
- See
users.tsor other entity routes for structure reference. - Postman for testing requests.
If you have any questions, feel free to reach out to Josh or Dommenick on Slack!
Metadata
Metadata
Labels
No labels