🚑 Fixed live-API

This commit is contained in:
Mawoka
2022-10-04 20:59:13 +02:00
parent 228accea8e
commit b25d16c21e
2 changed files with 14 additions and 3 deletions
+2 -2
View File
@@ -107,9 +107,9 @@ async def join_game(sid: str, data: dict):
await redis.sadd(f"game_session:{data.game_pin}:players", GamePlayer(username=data.username, sid=sid).json())
if data.custom_field == "":
data.custom_field = None
print(data.custom_field)
if data.custom_field is not None:
await redis.hset(f"game:{data.game_pin}:player:custom_fields", data.username, data.custom_field)
await redis.hset(f"game:{data.game_pin}:players:custom_fields", data.username, data.custom_field)
# await redis.set(
# f"game_session:{data.game_pin}",
# GameSession(admin=redis_res.admin, game_id=redis_res.game_id, answers=[]).json(),