1
0
Fork 0
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:
Michael Genson 2024-06-29 04:58:58 -05:00 committed by GitHub
parent 63a180ef2c
commit f4827abc1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 347 additions and 82 deletions

View file

@ -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);
}