Move basic SocketIO session handling to redis

This commit is contained in:
Mawoka
2024-07-11 19:50:22 +02:00
parent adbc28beb1
commit e6d7a8d087
4 changed files with 113 additions and 34 deletions
+3
View File
@@ -60,6 +60,9 @@ SPDX-License-Identifier: MPL-2.0
connect();
}
});
socket.on("session_id", (d) => {
const session_id = d.session_id
})
socket.on('registered_as_admin', (data) => {
quiz_data = JSON.parse(data['game']);
+3
View File
@@ -72,6 +72,9 @@ SPDX-License-Identifier: MPL-2.0
socket.on('time_sync', (data) => {
socket.emit('echo_time_sync', data);
});
socket.on("session_id", (d) => {
const session_id = d.session_id
})
socket.on('connect', async () => {
console.log('Connected!');