| ... | ... | @@ -14,31 +14,9 @@ Uses some decorators as explained in the [User](./user) page, but it also has so |
|
|
|
|
|
|
|
### create a new game, POST /game/new
|
|
|
|
|
|
|
|
- Body must contain a newGameDTO JSON-object as specified in `game.dto.ts`:
|
|
|
|
- Uses the AuthGuard-decorator to only pass requests made by valid users
|
|
|
|
|
|
|
|
```
|
|
|
|
{
|
|
|
|
name: string;
|
|
|
|
desc: string;
|
|
|
|
center: {
|
|
|
|
lat: number;
|
|
|
|
lng: number;
|
|
|
|
}
|
|
|
|
startdate: string;
|
|
|
|
enddate: string;
|
|
|
|
image: string;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
- `name` is limited between 3 and 31 characters
|
|
|
|
|
|
|
|
- `desc` is limited between 1 and 255 characters
|
|
|
|
|
|
|
|
- `center` is an object, which contains the latlng pair
|
|
|
|
|
|
|
|
- `startdate` and `enddate` must be valid Date String
|
|
|
|
|
|
|
|
- `image` is the path to the image and is limited to 65 characters
|
|
|
|
- Body must contain a newGameDTO JSON-object as specified in [`game.dto.ts`](./dtos#newGameDTO)
|
|
|
|
|
|
|
|
### edit a created game, PUT /game/edit/{game's UUID}
|
|
|
|
|
| ... | ... | |
| ... | ... | |