Endpoint for live player-scores

This commit is contained in:
Mawoka
2022-09-25 21:04:38 +02:00
parent 50eeb3fa84
commit c8402c697a
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -348,3 +348,9 @@ async def set_next_question(game_pin: int, question_number: int, api_key: str):
},
room=game_pin,
)
@router.get("/live/scores", tags=["live"])
async def get_live_player_scores(game_pin: int):
res = await redis.hgetall(f"game_session:{game_pin}:player_scores")
return res