From e4c60409102f5eb19512b3952dccd0fc27cc03d4 Mon Sep 17 00:00:00 2001 From: ezeluduena Date: Fri, 10 Nov 2023 10:35:37 -0300 Subject: [PATCH] hotfix --- app/routers/games/games.py | 4 ++-- app/routers/games/schemas.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/routers/games/games.py b/app/routers/games/games.py index 3790e6e..7cdcac0 100644 --- a/app/routers/games/games.py +++ b/app/routers/games/games.py @@ -355,8 +355,8 @@ async def play_defense_card(game_name: str, defense_info: PlayDefenseInformation @router.patch("/{game_name}/the-thing-end-game") -async def the_thing_end_game(game_name: str, player_id: int): - utils.verify_player_is_the_thing(player_id, game_name) +async def the_thing_end_game(game_name: str, game_data: TheThingEndGameIn): + utils.verify_player_is_the_thing(game_data.player_id, game_name) services.finish_game_by_the_thing(game_name) json_msg = { diff --git a/app/routers/games/schemas.py b/app/routers/games/schemas.py index 267b499..59b6c12 100644 --- a/app/routers/games/schemas.py +++ b/app/routers/games/schemas.py @@ -190,3 +190,8 @@ class OneTwoEffectIn(BaseModel): player_id: int objective_player_id: int + +class TheThingEndGameIn(BaseModel): + model_config = ConfigDict(from_attributes=True) + + player_id: int \ No newline at end of file