mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-22 22:59:41 +02:00
feat: Offline Shopping List (#3760)
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
This commit is contained in:
parent
63a180ef2c
commit
f4827abc1d
14 changed files with 347 additions and 82 deletions
|
@ -21,6 +21,7 @@ const routes = {
|
|||
shoppingListIdUpdateLabelSettings: (id: string) => `${prefix}/groups/shopping/lists/${id}/label-settings`,
|
||||
|
||||
shoppingListItems: `${prefix}/groups/shopping/items`,
|
||||
shoppingListItemsCreateBulk: `${prefix}/groups/shopping/items/create-bulk`,
|
||||
shoppingListItemsId: (id: string) => `${prefix}/groups/shopping/items/${id}`,
|
||||
};
|
||||
|
||||
|
@ -49,6 +50,10 @@ export class ShoppingListItemsApi extends BaseCRUDAPI<
|
|||
baseRoute = routes.shoppingListItems;
|
||||
itemRoute = routes.shoppingListItemsId;
|
||||
|
||||
async createMany(items: ShoppingListItemCreate[]) {
|
||||
return await this.requests.post(routes.shoppingListItemsCreateBulk, items);
|
||||
}
|
||||
|
||||
async updateMany(items: ShoppingListItemOut[]) {
|
||||
return await this.requests.put(routes.shoppingListItems, items);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue