From 7e464fe4b9615b5423e7a6b3651eff7331400289 Mon Sep 17 00:00:00 2001 From: Mawoka Date: Fri, 7 Oct 2022 13:09:43 +0200 Subject: [PATCH] :sparkles: Added in_human-count thing to /live/get_question/now-endpoint --- classquiz/routers/live.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classquiz/routers/live.py b/classquiz/routers/live.py index 6a4cf28..c1a0009 100644 --- a/classquiz/routers/live.py +++ b/classquiz/routers/live.py @@ -222,7 +222,7 @@ async def get_live_player_scores(game_pin: str, api_key: str): @router.get("/get_question/now") -async def too_stupid_to_come_up_with_a_name(game_pin: str, api_key: str): +async def too_stupid_to_come_up_with_a_name(game_pin: str, api_key: str, in_human_count: bool = False): user_id = await check_api_key(api_key) redis_res = await redis.get(f"game:{game_pin}") if redis_res is None: @@ -241,8 +241,10 @@ async def too_stupid_to_come_up_with_a_name(game_pin: str, api_key: str): right=answer.right, answer=answer.answer, color=answer.color, color_code=color ) if game.current_question >= 0: + game.current_question += 1 return [{**game.questions[game.current_question].dict(), "current_question": game.current_question}] else: + game.current_question += 1 return [{"question": {}, "current_question": game.current_question}]