-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This story depends on #4.
As a user, given a valid JWT (see Implementation Notes, below), I should be able to submit a request to /users/:id/games and post game play information.
Acceptance Criteria:
- Get current game counts for a user
curl -H 'Authorization: Bearer <token>' localhost:8080/user/1/games - Update the count for one of the games:
curl -H 'Authorization: Bearer <token>' -X POST localhost:8080/user/1/games/train-of-thought(see 2nd implementation note) - See that the play count has increased by 1
curl -H 'Authorization: Bearer <token>' localhost:8080/user/1/games
Implementation Notes:
- A valid JWT can be generated via the
gen-token.jsscript at the root of this project. - If the user does not exist in the database (
src/data.js), it should be automatically created, since we fully trust the JWT as authentic 😉 - Should have basic validation (e.g. the given game slug exists, etc)
- The final route and payload to POST to is up to the implementer (and we will update the Acceptance Criteria to match)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request