generated from ctc-uci/npo-template-merged
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Quote
“You're the media's creation, yeah, your free will has been taken and you don't know.” - MC Ride, Culture Shock
Description
- Your task is to create backend CRUD routes that will allow us to interact with our database
- CRUD stands for Create, Read, Update, Delete. Each maps to a different function for a RESTful (invented at UCI 🐜) API in Express.js: post, get, put, delete
Instructions
- Create a Express.js file with routes for interacting with the
enrollment_changetable - Create a Express.js file with routes for interacting with the
media_changetable
Notes
- Use the
server/routes/sample.tsas reference for new routes
Acceptance Criteria
-
server/routes/enrollmentChange.jscontains CRUD routes for theenrollment_changetable- Route for creating an enrollment change
- Route for reading all enrollment changes
- Route for reading an enrollment change
- Route for updating an enrollment change
- Route for deleting an enrollment change
-
server/routes/mediaChange.jscontains CRUD routes for themedia_changetable- Route for creating a media change
- Route for reading all media changes
- Route for reading a media change
- Route for updating a media change
- Route for deleting a media change
- Add routes to
server/src/app.ts- enrollmentChangeRouter for
/enrollment-changes - mediaChangeRouter for
/media-changes
- enrollmentChangeRouter for
- Backend routes work, able to test using Postman/curl (Include pictures if possible)
- Be careful because routes will actually affect the database !!
Resources
- DB Model
- Refer to Sample API Route