git.99rst.org
/
flatnotes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
878ae8e
)
Fix "Incorrect login credentials" message.
author
Adam Dullage
<redacted>
Mon, 5 Feb 2024 13:05:46 +0000
(13:05 +0000)
committer
Adam Dullage
<redacted>
Mon, 5 Feb 2024 13:05:46 +0000
(13:05 +0000)
client/api.js
patch
|
blob
|
history
client/components/Login.vue
patch
|
blob
|
history
diff --git
a/client/api.js
b/client/api.js
index 661156766b9537757890218cad9abf63b03b14e3..af855de36bf591b4bfcd159c0509d48cc99d1473 100644
(file)
--- a/
client/api.js
+++ b/
client/api.js
@@
-26,7
+26,8
@@
api.interceptors.response.use(
function (error) {
if (
typeof error.response !== "undefined" &&
- error.response.status === 401
+ error.response.status === 401 &&
+ error.response.config.url !== "/api/token"
) {
EventBus.$emit(
"navigate",
diff --git
a/client/components/Login.vue
b/client/components/Login.vue
index f99be0ebc437ce9a938221e2ddcd5968a29b0b3b..4a42c03d6362e1c1ba26e3687c41e5864f6c5e36 100644
(file)
--- a/
client/components/Login.vue
+++ b/
client/components/Login.vue
@@
-146,7
+146,7
@@
export default {
return;
} else if (
typeof error.response !== "undefined" &&
- [400, 422].includes(error.response.status)
+ error.response.status == 401
) {
parent.$bvToast.toast("Incorrect login credentials ✘", {
variant: "danger",
git clone https://git.99rst.org/PROJECT