Skip to content
Snippets Groups Projects
Commit 01da9d6f authored by Ronnie Friman's avatar Ronnie Friman
Browse files

added delete-game path

parent dcc8354b
No related branches found
No related tags found
3 merge requests!59Development to master,!36Development,!33Small fixes
...@@ -9,6 +9,7 @@ import { ...@@ -9,6 +9,7 @@ import {
Put, Put,
UseInterceptors, UseInterceptors,
ClassSerializerInterceptor, ClassSerializerInterceptor,
Delete,
} from '@nestjs/common'; } from '@nestjs/common';
import { GameService } from './game.service'; import { GameService } from './game.service';
...@@ -39,6 +40,13 @@ export class GameController { ...@@ -39,6 +40,13 @@ export class GameController {
return this.gameservice.editGame(id, body); 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') @Put('edit-state/:id')
@Roles('admin') @Roles('admin')
@UsePipes(new ValidationPipe()) @UsePipes(new ValidationPipe())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment