fix: Reset loader state on error (#9597)

- Replace `showAlert` with `showAlertMessage` in auth related pages.
This commit is contained in:
Muhsin Keloth
2024-06-05 16:07:44 +05:30
committed by GitHub
parent c23e235cea
commit 839f7fe719
2 changed files with 10 additions and 8 deletions

View File

@@ -214,7 +214,7 @@ export default {
login(credentials)
.then(() => {
this.showAlert(this.$t('LOGIN.API.SUCCESS_MESSAGE'));
this.showAlertMessage(this.$t('LOGIN.API.SUCCESS_MESSAGE'));
})
.catch(response => {
// Reset URL Params if the authentication is invalid
@@ -222,7 +222,9 @@ export default {
window.location = '/app/login';
}
this.loginApi.hasErrored = true;
this.showAlert(response?.message || this.$t('LOGIN.API.UNAUTH'));
this.showAlertMessage(
response?.message || this.$t('LOGIN.API.UNAUTH')
);
});
},
},