diff --git a/src/game/game.controller.ts b/src/game/game.controller.ts index 24d42bbae81d23bbba83af27d06ec58268e69127..8d7494ba4dfa4a77e22963600e45a7579fca5d5d 100644 --- a/src/game/game.controller.ts +++ b/src/game/game.controller.ts @@ -9,6 +9,7 @@ import { Put, UseInterceptors, ClassSerializerInterceptor, + Delete, } from '@nestjs/common'; import { GameService } from './game.service'; @@ -39,6 +40,13 @@ export class GameController { return this.gameservice.editGame(id, body); } + @Delete('delete/:id') + @Roles('admin') + @GameStates('CREATED') + async deleteGame(@Param('id') id: string) { + return this.gameservice.deleteGame(id); + } + @Put('edit-state/:id') @Roles('admin') @UsePipes(new ValidationPipe())