Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a user, I would like to update my game play information #3

Open
RyanFrantz opened this issue May 31, 2022 · 0 comments
Open

As a user, I would like to update my game play information #3

RyanFrantz opened this issue May 31, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@RyanFrantz
Copy link
Contributor

RyanFrantz commented 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:

  • 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)
@RyanFrantz RyanFrantz added enhancement New feature or request good first issue Good for newcomers labels May 31, 2022
@RyanFrantz 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
@rogerlumos rogerlumos removed the good first issue Good for newcomers label Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants