Skip to content
Snippets Groups Projects

Join game

Merged Ghost User requested to merge JoinGame into Development
2 files
+ 7
13
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -23,14 +23,13 @@ export class GameController {
@@ -23,14 +23,13 @@ export class GameController {
@Post('new')
@Post('new')
@UseGuards(new AuthGuard())
@UseGuards(new AuthGuard())
//@UsePipes(new ValidationPipe())
@UsePipes(new ValidationPipe())
async newGame(@User('id') person, @Body() body: GameDTO) {
async newGame(@User('id') person, @Body() body: GameDTO) {
return this.gameservice.createNewGame(person, body);
return this.gameservice.createNewGame(person, body);
}
}
@Put(':id')
@Put(':id')
@Roles('admin')
@Roles('admin')
@UseGuards(new AuthGuard())
@UsePipes(new ValidationPipe())
@UsePipes(new ValidationPipe())
async editGame(@Param('id') id: string, @Body() body: GameDTO) {
async editGame(@Param('id') id: string, @Body() body: GameDTO) {
return this.gameservice.editGame(id, body);
return this.gameservice.editGame(id, body);
Loading