Fix lint
This commit is contained in:
parent
2a2d42c08d
commit
97239d973e
@ -32,21 +32,22 @@ const authProvider = {
|
|||||||
// called when the user clicks on the logout button
|
// called when the user clicks on the logout button
|
||||||
logout: () => {
|
logout: () => {
|
||||||
console.log("logout");
|
console.log("logout");
|
||||||
|
|
||||||
const logout_api_url = localStorage.getItem("base_url") + "/_matrix/client/r0/logout";
|
const logout_api_url =
|
||||||
|
localStorage.getItem("base_url") + "/_matrix/client/r0/logout";
|
||||||
const token = localStorage.getItem("access_token");
|
const token = localStorage.getItem("access_token");
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
user: {
|
user: {
|
||||||
authenticated: true,
|
authenticated: true,
|
||||||
token: `Bearer ${token}`,
|
token: `Bearer ${token}`,
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
return fetchUtils.fetchJson(logout_api_url, options).then(({ json }) => {
|
return fetchUtils.fetchJson(logout_api_url, options).then(({ json }) => {
|
||||||
localStorage.removeItem("access_token");
|
localStorage.removeItem("access_token");
|
||||||
localStorage.removeItem("device_id");
|
localStorage.removeItem("device_id");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// called when the API returns an error
|
// called when the API returns an error
|
||||||
|
Loading…
Reference in New Issue
Block a user