This commit is contained in:
2023-01-30 18:26:59 +01:00
parent 2960d1ffd8
commit d905fcc05c
3 changed files with 5 additions and 5 deletions
-2
View File
@@ -51,8 +51,6 @@ export default defineComponent({
data data
.then((res) => { .then((res) => {
console.log(res.data);
this.store.user = res.data.user; this.store.user = res.data.user;
this.store.authState = AuthState.AUTHORIZED; this.store.authState = AuthState.AUTHORIZED;
this.$router.push('/'); this.$router.push('/');
+1 -1
View File
@@ -61,7 +61,7 @@ h1 {
.card_actions { .card_actions {
display: flex; display: flex;
justify-content: center; justify-content: flex-end;
} }
</style> </style>
+4 -2
View File
@@ -81,7 +81,7 @@ export default defineComponent({
if (!e.response || e.response.status === undefined) { if (!e.response || e.response.status === undefined) {
this.store.alertMessage = 'Wystąpił błąd podczas łączenia z serwerem!'; this.store.alertMessage = 'Wystąpił błąd podczas łączenia z serwerem!';
return; return false;
} }
const response = e.response; const response = e.response;
@@ -89,11 +89,13 @@ export default defineComponent({
if (status == 401) { if (status == 401) {
this.store.alertMessage = 'Nieprawidłowe dane!'; this.store.alertMessage = 'Nieprawidłowe dane!';
return; return false;
} }
this.store.alertMessage = 'Wystąpił błąd podczas łączenia z serwerem!'; this.store.alertMessage = 'Wystąpił błąd podczas łączenia z serwerem!';
} }
return true;
}, },
}, },
}); });