fix logout function, prepare for multi-account support

This commit is contained in:
Ren Amamiya
2023-09-08 08:36:15 +07:00
parent 472925bb05
commit a1fa777f8c
12 changed files with 119 additions and 112 deletions

View File

@@ -291,6 +291,15 @@ export class LumeStorage {
);
}
public async accountLogout() {
await this.db.execute("UPDATE accounts SET is_active = '0' WHERE id = $1;", [
this.account.id,
]);
this.account = null;
return true;
}
public async close() {
return this.db.close();
}