mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-11 15:35:36 -04:00
chore: Nuxt 4 upgrade (#7426)
This commit is contained in:
18
frontend/app/lib/api/user/group-cookbooks.ts
Normal file
18
frontend/app/lib/api/user/group-cookbooks.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { BaseCRUDAPI } from "../base/base-clients";
|
||||
import type { CreateCookBook, ReadCookBook, UpdateCookBook } from "~/lib/api/types/cookbook";
|
||||
|
||||
const prefix = "/api";
|
||||
|
||||
const routes = {
|
||||
cookbooks: `${prefix}/households/cookbooks`,
|
||||
cookbooksId: (id: number) => `${prefix}/households/cookbooks/${id}`,
|
||||
};
|
||||
|
||||
export class CookbookAPI extends BaseCRUDAPI<CreateCookBook, ReadCookBook, UpdateCookBook> {
|
||||
baseRoute: string = routes.cookbooks;
|
||||
itemRoute = routes.cookbooksId;
|
||||
|
||||
async updateAll(payload: UpdateCookBook[]) {
|
||||
return await this.requests.put(this.baseRoute, payload);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user