Closed Jul-S closed 2 years ago
Who: As a developer What: I want to be able to get all purchases made by specific user Why: so that we can show it in user profile
The endpoint needs to return a result that allows the frontend to display purchase info as marked red below:
GET
Check the README file here https://github.com/HackYourFuture-CPH/fp-class18/#-working-with-api-documentation---swagger and this article should also help you with that https://blog.logrocket.com/documenting-your-express-api-with-swagger/
Please ignore the ITEM ID line that we can see in the wireframes.
User story
Who: As a developer What: I want to be able to get all purchases made by specific user Why: so that we can show it in user profile
Acceptance criteria
The endpoint needs to return a result that allows the frontend to display purchase info as marked red below:
Implementation details
GET
endpoint for 'api/orders?user={user_id}'Check the README file here https://github.com/HackYourFuture-CPH/fp-class18/#-working-with-api-documentation---swagger and this article should also help you with that https://blog.logrocket.com/documenting-your-express-api-with-swagger/