mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Toast] Added error parsing global function
This commit is contained in:
1 parent
24a47e4859
commit
8ae34e2829
2 files changed
+2
-1
No files matched your search
@@ -49,7 +49,7 @@ export default {
|
|||||||
await this.$store.dispatch('auth/login', this.form)
|
await this.$store.dispatch('auth/login', this.form)
|
||||||
this.$router.push({ name: 'Dashboard - Tasks'})
|
this.$router.push({ name: 'Dashboard - Tasks'})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error?.response?.data?.message || error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,5 +10,6 @@ export default {
|
|||||||
app.use(VueToast)
|
app.use(VueToast)
|
||||||
|
|
||||||
// app.config.globalProperties.$wToast = new Toast()
|
// app.config.globalProperties.$wToast = new Toast()
|
||||||
|
app.config.globalProperties.$parseError = (error) => error?.data?.message || error?.response?.data?.message || error?.message || error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user