fix logout

This commit is contained in:
Georges-Antoine Assi committed 2025-02-27 11:06:02 -05:00
1 parent 39e09d0d57
commit 62953e45ff
3 files changed
+5 -9

No files matched your search

@@ -36,14 +36,14 @@ async function logout() {
color: "green",
});
// Redirect to login page
await router.push({ name: ROUTES.LOGIN });
// Clear all pinia stores
// @ts-expect-error(2339)
getActivePinia()?._s.forEach((store: StateTree) => {
store.reset?.();
});
// Redirect to login page
await router.push({ name: ROUTES.LOGIN });
});
}
</script>
+1 -3
View File
@@ -58,8 +58,6 @@ export default defineStore("config", {
isExclusionType(type: string): type is ExclusionTypes {
return Object.keys(this.config).includes(type);
},
reset() {
this.config = defaultConfig;
},
reset() {},
},
});
+1 -3
View File
@@ -32,8 +32,6 @@ export default defineStore("heartbeat", {
},
]).value.filter((s) => !s.disabled);
},
reset() {
this.value = {} as HeartbeatResponse;
},
reset() {},
},
});