Skip to content

Create an API for adding a new game to the database. #5

@Treyhesari

Description

@Treyhesari

This story depends on #4.

As a user, I want to be able to add an entirely new game to the list of games known by this project.

Acceptance Criteria:

  • Get current game counts for a user curl localhost:8080/games
  • Add a new game record: curl -H 'Authentication: Bearer <token>' -H 'Content-Type: application/json' -d $some-json-payload -X POST localhost:8080/games where $some-json-payload is a valid JSON payload, and <token> is a valid JWT
  • See that the game has been created: curl localhost:8080/game/:some-game-id where :some-game-id is the new game's slug

Implementation Notes:

  • 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions