From b9bcb7eaac122ab837a2ae11121a2cf8d30aaa96 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sat, 1 May 2021 06:20:51 +0000 Subject: [PATCH] fix cors exception msg --- src/boot/axios.js | 4 +++- src/views/Login.vue | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/boot/axios.js b/src/boot/axios.js index bda3ec7..3d72b16 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -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" }); diff --git a/src/views/Login.vue b/src/views/Login.vue index 05d06ec..88cb96c 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -95,7 +95,7 @@ export default { onSubmit() { this.$store .dispatch("retrieveToken", this.credentials) - .then(response => { + .then(() => { this.credentials = {}; this.$router.push({ name: "Dashboard" }); })