-
Notifications
You must be signed in to change notification settings - Fork 1
Pantry CRUD SERVICE - UPDATE and DELETE SINGLE ITEMS #2
Copy link
Copy link
Open
Description
THIS IS part of the BACKEND series:
Add a new pantry item (name, quantity, expiry date)- DONE !
Update an item (quantity, expiry, notes)
Delete a single item
MAYBE: CLEAR ALL ITEMS FROM PANTRY
PART OF BUILD PANTRY MANUAL PATH
(OCR receipt → parse items → build pantry → match recipes)
Implementation Details:
pantry_service.py:
list_items(uid: str) → list[PantryItem]
add_item(uid: str, item: PantryItemCreate) → PantryItem
update_item(uid: str, item_id: str, updates: PantryItemUpdate) → PantryItem
delete_item(uid: str, item_id: str) → None
clear_all(uid: str) → None
pantry.py:
POST /pantry/ → add (201)
PATCH /pantry/{item_id} → update
DELETE /pantry/{item_id} → delete (204)
DELETE /pantry/ → clear all (204)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels