diff --git a/src/components/GameWindow.vue b/src/components/GameWindow.vue
index 8ad1043..f4d9004 100644
--- a/src/components/GameWindow.vue
+++ b/src/components/GameWindow.vue
@@ -37,7 +37,13 @@
},
}
)
- .then(response => response.json())
+ .then(response => {
+ if (response.status == 401) {
+ router.push('/login');
+ return
+ }
+ return response.json()
+ })
.then(data => {
team.value = data
const newActions = team.value?.actions
@@ -46,7 +52,6 @@
}
})
.catch(error => {
- router.push('/login');
console.error('Ошибка:', error)
});
}
diff --git a/src/components/LoginWindow.vue b/src/components/LoginWindow.vue
index 87c9fe6..459aea2 100644
--- a/src/components/LoginWindow.vue
+++ b/src/components/LoginWindow.vue
@@ -1,12 +1,12 @@