Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(server): Lobby API improvements (#675)
* feat(server): Improve game creation API input checks - Move default numPlayers to CreateGame method - Only add setupData to metadata if not undefined - Ensure unlisted is always a boolean value * refactor(server): Improve typings in API code * feat(server): Throw 404 from create endpoint if game not found * test(server): Improve typing in API tests * feat(server): Use db.createGame method in Lobby API Use Storage API’s createGame method instead of calls to setState & setMetadata in the lobby API * test(server): Add test for 404 error if game to create doesn’t exist * test(server): Refactor nesting of Lobby API tests * test(server): Test join endpoint with & without custom player data * test(server): Break up game creation tests for each API option Co-authored-by: Nicolo John Davis <nicolodavis@gmail.com>
- Loading branch information