mirror of
https://github.com/balzack/databag.git
synced 2025-04-23 18:15:19 +00:00
avoid unnessary wait on logout
This commit is contained in:
parent
be9451ad42
commit
d575368ba1
@ -82,19 +82,16 @@ export class DatabagSDK {
|
||||
public async logout(session: Session, all: boolean): Promise<void> {
|
||||
const sessionModule = session as SessionModule;
|
||||
const params = await sessionModule.close();
|
||||
try {
|
||||
const { node, secure, token } = params;
|
||||
await clearLogin(node, secure, token, all);
|
||||
}
|
||||
catch(err) {
|
||||
this.log.error(err);
|
||||
}
|
||||
try {
|
||||
await this.store.clearLogin();
|
||||
}
|
||||
catch(err) {
|
||||
this.log.error(err);
|
||||
}
|
||||
const { node, secure, token } = params;
|
||||
clearLogin(node, secure, token, all).then(() => {}).catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
public async configure(node: string, secure: boolean, token: string, mfaCode: string | null): Promise<Node> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user