mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-17 15:55:13 -05:00
fix: clear cached store data on logout to prevent user data leakage (#6665)
This commit is contained in:
@@ -7,6 +7,12 @@ const store: Ref<HouseholdSummary[]> = ref([]);
|
||||
const loading = ref(false);
|
||||
const publicLoading = ref(false);
|
||||
|
||||
export function resetHouseholdStore() {
|
||||
store.value = [];
|
||||
loading.value = false;
|
||||
publicLoading.value = false;
|
||||
}
|
||||
|
||||
export const useHouseholdStore = function (i18n?: Composer) {
|
||||
const api = useUserApi(i18n);
|
||||
return useReadOnlyStore<HouseholdSummary>("household", store, loading, api.households);
|
||||
|
||||
Reference in New Issue
Block a user