| ... | ... | @@ -8,9 +8,9 @@ Contains 13 routes, which are all prefixed with url `game`. |
|
|
|
|
|
|
|
Uses some decorators as explained in the [User](./user) page, but it also has some new faces:
|
|
|
|
|
|
|
|
`@Roles('gameperson-role')` validates the user's role from the token. Returns 403 Unauthorized, if the user does not match the requirements. The decorator needs the game's UUID as a parameter in the URL. Stored in the `shared` folder.
|
|
|
|
[`@Roles('gameperson-role')`](./shared#rolesguardts) validates the user's role from the token. Returns 403 Unauthorized, if the user does not match the requirements. The decorator needs the game's UUID as a parameter in the URL. Stored in the `shared` folder.
|
|
|
|
|
|
|
|
`@GameStates('CREATED')` validates the game's current state. Returns 403 Unauthorized, if the game's state does not match the criteria. This decorator also needs the game's UUID as a parameter in the URL. Stored in the `shated` folder.
|
|
|
|
[`@GameStates('CREATED')`](./shared#statesguardts) validates the game's current state. Returns 403 Unauthorized, if the game's state does not match the criteria. This decorator also needs the game's UUID as a parameter in the URL. Stored in the `shated` folder.
|
|
|
|
|
|
|
|
### create a new game, POST /game/new
|
|
|
|
|
| ... | ... | |
| ... | ... | |