Fixed logging out
This commit is contained in:
parent
ee2ca7fbaf
commit
3ec1b94ee7
2 changed files with 2 additions and 1 deletions
|
@ -62,6 +62,7 @@ App.Auth = function(jQuery, util, api, appState, promise) {
|
|||
function logout() {
|
||||
return promise.make(function(resolve, reject) {
|
||||
jQuery.removeCookie('auth');
|
||||
appState.set('loginToken', null);
|
||||
return loginAnonymous().then(resolve).fail(reject);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ App.Presenters.LogoutPresenter = function(
|
|||
var $messageDiv = messagePresenter.showInfo($messages, 'Logged out. <a href="">Back to main page</a>');
|
||||
$messageDiv.find('a').click(mainPageLinkClicked);
|
||||
}).fail(function(response) {
|
||||
messagePresenter.showError($messages, response.json && response.json.error || response);
|
||||
messagePresenter.showError(($messages, response.json && response.json.error || response) + '<br/>Reload the page to continue.');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue