mirror of
https://github.com/balzack/databag.git
synced 2025-05-04 15:35:16 +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> {
|
public async logout(session: Session, all: boolean): Promise<void> {
|
||||||
const sessionModule = session as SessionModule;
|
const sessionModule = session as SessionModule;
|
||||||
const params = await sessionModule.close();
|
const params = await sessionModule.close();
|
||||||
try {
|
|
||||||
const { node, secure, token } = params;
|
|
||||||
await clearLogin(node, secure, token, all);
|
|
||||||
}
|
|
||||||
catch(err) {
|
|
||||||
this.log.error(err);
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
await this.store.clearLogin();
|
await this.store.clearLogin();
|
||||||
}
|
}
|
||||||
catch(err) {
|
catch(err) {
|
||||||
this.log.error(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> {
|
public async configure(node: string, secure: boolean, token: string, mfaCode: string | null): Promise<Node> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user