mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Fixed logging out
This commit is contained in:
@ -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.');
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user