Ajout endpoint pour changer de joueur⋅se actif⋅ve

This commit is contained in:
2024-12-08 20:01:43 +01:00
parent 4c157ff67f
commit 3eea3a7409
2 changed files with 28 additions and 0 deletions

View File

@ -35,6 +35,18 @@ export class GameController {
return new GameEntity(await this.gameService.start())
}
/**
* Change de joueur⋅se en course après une capture
*
* @throws {401} Non authentifié⋅e
*/
@Post('/switch-running-player')
@UseGuards(JwtAuthGuard)
@ApiBearerAuth()
async switchRunningPlayer(): Promise<GameEntity> {
return new GameEntity(await this.gameService.switchRunningPlayer())
}
/**
* Arrêter le jeu
* @remarks Arrête le jeu (si déjà lancé), à n'utiliser qu'en fin de partie.