mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Delete session after corresponding group2session and author2session
This commit is contained in:
parent
ec5f2b125f
commit
09c9e32d72
1 changed files with 3 additions and 3 deletions
|
@ -204,9 +204,6 @@ exports.deleteSession = async (sessionID) => {
|
||||||
const group2sessions = await db.get(`group2sessions:${groupID}`);
|
const group2sessions = await db.get(`group2sessions:${groupID}`);
|
||||||
const author2sessions = await db.get(`author2sessions:${authorID}`);
|
const author2sessions = await db.get(`author2sessions:${authorID}`);
|
||||||
|
|
||||||
// remove the session
|
|
||||||
await db.remove(`session:${sessionID}`);
|
|
||||||
|
|
||||||
// remove session from group2sessions
|
// remove session from group2sessions
|
||||||
if (group2sessions != null) { // Maybe the group was already deleted
|
if (group2sessions != null) { // Maybe the group was already deleted
|
||||||
delete group2sessions.sessionIDs[sessionID];
|
delete group2sessions.sessionIDs[sessionID];
|
||||||
|
@ -218,6 +215,9 @@ exports.deleteSession = async (sessionID) => {
|
||||||
delete author2sessions.sessionIDs[sessionID];
|
delete author2sessions.sessionIDs[sessionID];
|
||||||
await db.set(`author2sessions:${authorID}`, author2sessions);
|
await db.set(`author2sessions:${authorID}`, author2sessions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove the session
|
||||||
|
await db.remove(`session:${sessionID}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.listSessionsOfGroup = async (groupID) => {
|
exports.listSessionsOfGroup = async (groupID) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue