fix: go to url when game found

This commit is contained in:
2023-12-23 16:56:04 +01:00
parent 8529963f97
commit 39ea33cc8e
2 changed files with 12 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class MatchMaking(WebsocketConsumer):
print(len(waiting_room), "/", self.mode, [len(waiting_room),self.mode])
if (len(waiting_room) == self.mode):
game_id: int = GameModel().create(waiting_room.get_users_id())
waiting_room.broadcast({"detail": "Game found !", "game_id": game_id})
waiting_room.broadcast("game_found", {"game_id": game_id})
waiting_room.clear()
def disconnect(self, close_code):