[WIP] Фикс удаления токена
This commit is contained in:
@@ -55,7 +55,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
logout() {
|
||||
localStorage.clear();
|
||||
localStorage.removeItem("tokenAccess");
|
||||
this.$router.push("/login");
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user