[WIP] Фикс удаления токена

This commit is contained in:
megavrilinvv
2022-12-07 13:50:27 +03:00
parent 0e352544e8
commit 463a54b7e3
3 changed files with 5 additions and 5 deletions

View File

@@ -107,8 +107,8 @@ export default {
fetchEmployeesData() {
fetchWrapper.get("general/employee/").then((res) => {
if (res.type === "client_error") {
localStorage.clear();
this.$router.push("/login");
localStorage.removeItem("tokenAccess");
return this.$router.push("/login");
} else this.saveEmployeesData(res);
});
},

View File

@@ -139,8 +139,8 @@ export default {
}`
);
if (response.type === "client_error") {
localStorage.clear();
this.$router.push("/login");
localStorage.removeItem("tokenAccess");
return this.$router.push("/login");
} else {
this.saveDataClients(response);
this.saveClientsCount(response);