mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Fix logout not working properly after moving logic to UserStore
This commit is contained in:
parent
2ad2ea242d
commit
b24e66ed11
@ -45,9 +45,10 @@ class UserStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLogoutCurrentUser() {
|
onLogoutCurrentUser() {
|
||||||
this.getInstance()
|
this.getInstance().performLogoutCurrentUser();
|
||||||
.performLogoutCurrentUser()
|
}
|
||||||
.then(() => {
|
|
||||||
|
onSuccessLogoutCurrentUser() {
|
||||||
EventActions.userDidLogout();
|
EventActions.userDidLogout();
|
||||||
|
|
||||||
// Reset all stores back to their initial state
|
// Reset all stores back to their initial state
|
||||||
@ -59,11 +60,6 @@ class UserStore {
|
|||||||
// Since we've just logged out, we can set this store's
|
// Since we've just logged out, we can set this store's
|
||||||
// hasLoaded flag back to true as there is no current user.
|
// hasLoaded flag back to true as there is no current user.
|
||||||
this.userMeta.hasLoaded = true;
|
this.userMeta.hasLoaded = true;
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onSuccessLogoutCurrentUser() {
|
|
||||||
this.currentUser = {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onErrorCurrentUser(err) {
|
onErrorCurrentUser(err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user