extend to logged-in APIs for cookbooks and households

This commit is contained in:
Michael Genson 2025-06-30 20:06:09 +00:00
commit 6503ab48b4
2 changed files with 4 additions and 4 deletions

View file

@ -7,8 +7,8 @@ const store: Ref<RecipeCookBook[]> = ref([]);
const loading = ref(false);
const publicLoading = ref(false);
export const useCookbookStore = function () {
const api = useUserApi();
export const useCookbookStore = function (i18n?: Composer) {
const api = useUserApi(i18n);
return useStore<RecipeCookBook>(store, loading, api.cookbooks);
};

View file

@ -7,8 +7,8 @@ const store: Ref<HouseholdSummary[]> = ref([]);
const loading = ref(false);
const publicLoading = ref(false);
export const useHouseholdStore = function () {
const api = useUserApi();
export const useHouseholdStore = function (i18n?: Composer) {
const api = useUserApi(i18n);
return useReadOnlyStore<HouseholdSummary>(store, loading, api.households);
};