diff --git a/sockets/socketLogic.js b/sockets/socketLogic.js index ce9a4ddb3e43a892322e15f94fba28dd9c2efa48..3f5902257a0b6bc5ac806bac636cf018a378005d 100644 --- a/sockets/socketLogic.js +++ b/sockets/socketLogic.js @@ -64,9 +64,13 @@ async function convertLobbyToGame(lobbyId, socket) { lobby.price * lobby.users.length, ); await game.setGameData(); - console.log(game); - socket.to(lobbyId).emit("startGame", game); - socket.emit("startGame", game); + const reducedGame = { + id: game.id, + users: game.users, + category: game.category, + }; + socket.to(lobbyId).emit("startGame", reducedGame); + socket.emit("startGame", reducedGame); const interval = setInterval(async () => { time--; socket.to(lobbyId).emit("timer", time);