Public Access
fix(pantry): make public ingredient endpoint idempotent
Backend: - POST /api/ingredients now checks name_lower and aliases before inserting - Returns existing ingredient on 409 instead of throwing error Frontend: - Removed fragile 409-recovery logic from Pantry.tsx handleAdd - Added aliases field to Ingredient type for case-insensitive matching Fixes pantry add for ingredients like 'Carrots' whose canonical name is 'Carrot'
This commit is contained in:
@@ -299,6 +299,7 @@ Generate plan → Send proposal email (per-member tokens)
|
||||
| POST | `/api/pantry` | Add item to pantry |
|
||||
| DELETE | `/api/pantry/{id}` | Remove item from pantry |
|
||||
| POST | `/api/feedback` | Submit meal feedback |
|
||||
| POST | `/api/ingredients` | Create or resolve ingredient (public, idempotent) |
|
||||
| GET | `/api/recipes` | Search recipes |
|
||||
| POST | `/api/admin/scrape` | Trigger grocery scrape (admin) |
|
||||
| GET | `/api/admin/logs` | Get scraper logs |
|
||||
|
||||
Reference in New Issue
Block a user