codersforcauses / repair-lab

https://repair-labs.vercel.app
MIT License
8 stars 3 forks source link

Issue 109 get endpoint to get repairers for an event #173

Closed tonglam closed 9 months ago

tonglam commented 10 months ago

Change Summary

  1. Create a GET /api/event/{eventId}/repairers endpoint
  2. Create unit test for the endpoint

Change Form

Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.

Other Information

[Is there anything in particular in the review that I should be aware of?]

tonglam commented 10 months ago
image

⚠ Duplicate page detected. src/pages/api/event/[id]/repairers.ts and src/pages/api/event/[id]/repairers/index.ts resolve to /api/event/[id]/repairers

======================= I find out there is another issue add an new enpoint, but the name is same as issue #109, so the pages will be duplicated. I think we need to change one of these names, or merge the codes in one file.

justinliangg commented 10 months ago
image

⚠ Duplicate page detected. src/pages/api/event/[id]/repairers.ts and src/pages/api/event/[id]/repairers/index.ts resolve to /api/event/[id]/repairers

======================= I find out there is another issue add an new enpoint, but the name is same as issue #109, so the pages will be duplicated. I think we need to change one of these names, or merge the codes in one file.

Yes, you will need to merge them together. Should be able to POST and GET repairers on /event/:eventId/repairers endpoint