Open DietBepis1 opened 1 year ago
Hi @DietBepis1, I'd like to take this on if that's ok!
@xica, pick one endpoint to focus on and you're good! This relies on the admin
table which is also under development, but you can look at that issue for the schema and create a temporary db migration to test locally.
@DietBepis1 Sounds good, I'll take the Get Admins endpoint
Hi @DietBepis1, I'd like to give the PUT admins endpoint a try please.
Hi @DietBepis1 I'll work on the POST endpoints!
Hi, @DietBepis1 I'll work on the DELETE endpoint.
Description
For our new control panel feature, we will need to create some rest endpoints that will handle our new
admin
model. These will need to be under thev1
endpoint schema, which may or may not be made by the time this is worked on 😉 . Endpoints should consume JSON.Dependencies
Spec
We need to create:
[ ] GET /v1/admins; Gets a list of admins
[ ] POST /v1/admins; Given a single bit of JSON, or an array of JSON, create n
admin
entries[ ] PUT /v1/admins/:id; Given an id and a JSON payload, update the modified fields of the
admin
whose id was given[ ] DELETE /v1/admins/:id Given an id, delete the
admin
entryEach of these endpoints should also have appropriate testing!
Copilot Prompts
Help me write a(n) <insert http verb> endpoint using ExpressJS.
Explain how Express routes requests.
How can I group express endpoints with a version?
Target Date: 11/15/23 📆