Fix logout
This commit is contained in:
parent
02a1bad183
commit
6b812e849e
1 changed files with 5 additions and 1 deletions
6
main.js
6
main.js
|
@ -88,7 +88,11 @@ class MattermostClient {
|
|||
}
|
||||
|
||||
async logOut() {
|
||||
const response = await this.api.post("/users/logout");
|
||||
const stored = this.storage.get(this.api.id);
|
||||
if (!stored || !stored.token) {
|
||||
throw Error("No token stored");
|
||||
}
|
||||
const response = await this.api.post("/users/logout", undefined, stored.token);
|
||||
//this.storage.clear(this.api.id);
|
||||
return response.responseJson;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue