You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.js script 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)
The text was updated successfully, but these errors were encountered:
RyanFrantz
changed the title
As a user, I would like to update my game play data
As a user, I would like to update my game play information
May 31, 2022
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:
curl -H 'Authorization: Bearer <token>' localhost:8080/user/1/games
curl -H 'Authorization: Bearer <token>' -X POST localhost:8080/user/1/games/train-of-thought
(see 2nd implementation note)curl -H 'Authorization: Bearer <token>' localhost:8080/user/1/games
Implementation Notes:
gen-token.js
script at the root of this project.src/data.js
), it should be automatically created, since we fully trust the JWT as authentic 😉The text was updated successfully, but these errors were encountered: