Add custom flash library that works as expected
This commit is contained in:
parent
bab20812a0
commit
0a706d1b45
13 changed files with 233 additions and 37 deletions
|
@ -43,6 +43,7 @@
|
|||
submitToken: function () {
|
||||
const self = this;
|
||||
|
||||
self.clearFlashes();
|
||||
axios.post(this.route('auth.login-checkpoint'), {
|
||||
confirmation_token: this.$route.query.token,
|
||||
authentication_code: this.$data.code,
|
||||
|
@ -57,7 +58,9 @@
|
|||
|
||||
const response = err.response;
|
||||
if (response.data && _.isObject(response.data.errors)) {
|
||||
self.flash({message: response.data.errors[0].detail, variant: 'danger'});
|
||||
response.data.errors.forEach(function (error) {
|
||||
self.error(error.detail);
|
||||
});
|
||||
self.$router.push({ name: 'login' });
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue