🚑 Fixed #177
This commit is contained in:
@@ -341,11 +341,12 @@ async def submit_answer(sid: str, data: dict):
|
||||
answers = _AnswerDataList.parse_raw(await redis.get(f"game_session:{session['game_pin']}:{data.question_index}"))
|
||||
player_count = await redis.scard(f"game_session:{session['game_pin']}:players")
|
||||
if len(answers.__root__) == player_count:
|
||||
await sio.emit(
|
||||
"question_results",
|
||||
await redis.get(f"game_session:{session['game_pin']}:{data.question_index}"),
|
||||
room=session["game_pin"],
|
||||
)
|
||||
# await sio.emit(
|
||||
# "question_results",
|
||||
# await redis.get(f"game_session:{session['game_pin']}:{data.question_index}"),
|
||||
# room=session["game_pin"],
|
||||
# )
|
||||
await sio.emit("everyone_answered", {})
|
||||
# await redis.set(f"game_data:{session['game_pin']}", json.dumps(data))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user