mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-10 15:05:35 -04:00
chore: Nuxt 4 upgrade (#7426)
This commit is contained in:
25
frontend/app/lib/api/client-public.ts
Normal file
25
frontend/app/lib/api/client-public.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { ValidatorsApi } from "./public/validators";
|
||||
import { ExploreApi } from "./public/explore";
|
||||
import { SharedApi } from "./public/shared";
|
||||
import type { ApiRequestInstance } from "~/lib/api/types/non-generated";
|
||||
|
||||
export class PublicApi {
|
||||
public validators: ValidatorsApi;
|
||||
public shared: SharedApi;
|
||||
|
||||
constructor(requests: ApiRequestInstance) {
|
||||
this.validators = new ValidatorsApi(requests);
|
||||
this.shared = new SharedApi(requests);
|
||||
}
|
||||
}
|
||||
|
||||
export class PublicExploreApi extends PublicApi {
|
||||
public explore: ExploreApi;
|
||||
|
||||
constructor(requests: ApiRequestInstance, groupSlug: string) {
|
||||
super(requests);
|
||||
this.explore = new ExploreApi(requests, groupSlug);
|
||||
|
||||
Object.freeze(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user