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
14 changed files with 347 additions and 82 deletions

View File

@@ -136,11 +136,7 @@ class ShoppingListItemController(BaseCrudController):
def delete_many(self, ids: list[UUID4] = Query(None)):
items = self.service.bulk_delete_items(ids)
publish_list_item_events(self.publish_event, items)
message = (
f"Successfully deleted {len(items.deleted_items)} {'item' if len(items.deleted_items) == 1 else 'items'}"
)
return SuccessResponse.respond(message=message)
return SuccessResponse.respond()
@item_router.delete("/{item_id}", response_model=SuccessResponse)
def delete_one(self, item_id: UUID4):