mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
fix: Refactor Stores and Fix Missing Public Cookbooks (#5611)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
parent
2f19d31d1b
commit
aad7dc1abd
11 changed files with 96 additions and 45 deletions
|
@ -1,3 +1,4 @@
|
|||
import type { Composer } from "vue-i18n";
|
||||
import { useReadOnlyStore } from "../partials/use-store-factory";
|
||||
import { useRequests } from "../api/api-client";
|
||||
import type { UserSummary } from "~/lib/api/types/user";
|
||||
|
@ -11,8 +12,8 @@ class GroupUserAPIReadOnly extends BaseCRUDAPIReadOnly<UserSummary> {
|
|||
itemRoute = (idOrUsername: string | number) => `/groups/members/${idOrUsername}`;
|
||||
}
|
||||
|
||||
export const useUserStore = function () {
|
||||
const requests = useRequests();
|
||||
export const useUserStore = function (i18n?: Composer) {
|
||||
const requests = useRequests(i18n);
|
||||
const api = new GroupUserAPIReadOnly(requests);
|
||||
|
||||
return useReadOnlyStore<UserSummary>(store, loading, api, { orderBy: "full_name" });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue