mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
Fix signing out after changing password
This commit is contained in:
parent
52281dd25c
commit
b948f27692
@ -61,13 +61,11 @@ function changePassword() {
|
||||
return swal({
|
||||
type: 'success',
|
||||
text: msg
|
||||
}).then(() => logout()).catch(err => {
|
||||
docCookies.removeItem('token') && console.warn(err);
|
||||
}).then(() => {
|
||||
return logout();
|
||||
}).then(({ errno }) => {
|
||||
if (errno == 0) {
|
||||
window.location = url('auth/login');
|
||||
}
|
||||
}).catch(showAjaxError);
|
||||
});
|
||||
} else {
|
||||
return swal({ type: 'warning', text: msg });
|
||||
}
|
||||
@ -111,13 +109,11 @@ function changeEmail() {
|
||||
return swal({
|
||||
type: 'success',
|
||||
text: msg
|
||||
}).then(() => logout()).catch(err => {
|
||||
docCookies.removeItem('token') && console.warn(err);
|
||||
}).then(() => {
|
||||
return logout();
|
||||
}).then(({ errno }) => {
|
||||
if (errno == 0) {
|
||||
window.location = url('auth/login');
|
||||
}
|
||||
}).catch(showAjaxError);
|
||||
});
|
||||
} else {
|
||||
return swal({ type: 'warning', text: msg });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user