Merge remote-tracking branch 'origin/api-v1.5.5' into dev

This commit is contained in:
Taha Yassine Kraiem 2022-04-12 18:14:03 +02:00
commit 9a33a7c923

View file

@ -87,8 +87,7 @@ const extractProjectKeyFromRequest = function (req) {
const getAvailableRooms = async function () {
let rooms = await io.of('/').adapter.allRooms();
return rooms;
return io.of('/').adapter.allRooms();
}
const respond = function (res, data) {
@ -175,7 +174,7 @@ const socketsLive = async function (req, res) {
}
}
}
liveSessions[projectKey] = uniqueSessions(liveSessions[_projectKey]);
liveSessions[projectKey] = uniqueSessions(liveSessions[projectKey]);
}
}
respond(res, liveSessions);
@ -204,7 +203,7 @@ const socketsLiveByProject = async function (req, res) {
}
}
}
liveSessions[projectKey] = uniqueSessions(liveSessions[_projectKey]);
liveSessions[projectKey] = uniqueSessions(liveSessions[projectKey] || []);
}
}
respond(res, liveSessions[_projectKey] || []);