fix cors exception msg

This commit is contained in:
wh1te909
2021-05-01 06:20:51 +00:00
parent baec3d6f19
commit b9bcb7eaac
2 changed files with 4 additions and 2 deletions

View File

@@ -42,7 +42,9 @@ export default function ({ router, store }) {
if (!error.response) {
text = error.message
}
else if (error.config.url === "/checkcreds/") {
text = "Bad credentials"
}
// unauthorized
else if (error.response.status === 401) {
router.push({ path: "/expired" });

View File

@@ -95,7 +95,7 @@ export default {
onSubmit() {
this.$store
.dispatch("retrieveToken", this.credentials)
.then(response => {
.then(() => {
this.credentials = {};
this.$router.push({ name: "Dashboard" });
})