removed data fetching interval

This commit is contained in:
Wenszel
2022-05-31 16:22:37 +02:00
parent 7a72626f87
commit 4551885c57
4 changed files with 48 additions and 23511 deletions
+2
View File
@@ -83,6 +83,7 @@ module.exports = (io, socket) => {
req.session.color = room.players[0].color;
req.session.save();
// Sending data to the user, after which player will be redirected to the game
socket.join(room._id);
socket.emit('player:data', JSON.stringify(req.session));
});
});
@@ -119,6 +120,7 @@ module.exports = (io, socket) => {
req.session.playerId = updatedRoom.players[updatedRoom.players.length - 1]._id;
req.session.color = colors[updatedRoom.players.length - 1];
req.session.save();
socket.join(room._id);
// Sending data to the user, after which player will be redirected to the game
socket.emit('player:data', JSON.stringify(req.session));
});
+8 -1416
View File
File diff suppressed because it is too large Load Diff