Fix new services implementation 10

This commit is contained in:
Urtzi Alfaro
2025-08-16 08:22:51 +02:00
parent 9de0f9943c
commit 119beb541f
5 changed files with 68 additions and 63 deletions

View File

@@ -151,6 +151,7 @@ async def list_ingredients(
skip: int = Query(0, ge=0, description="Number of records to skip"),
limit: int = Query(100, ge=1, le=1000, description="Number of records to return"),
category: Optional[str] = Query(None, description="Filter by category"),
product_type: Optional[str] = Query(None, description="Filter by product type (ingredient or finished_product)"),
is_active: Optional[bool] = Query(None, description="Filter by active status"),
is_low_stock: Optional[bool] = Query(None, description="Filter by low stock status"),
needs_reorder: Optional[bool] = Query(None, description="Filter by reorder needed"),
@@ -171,6 +172,8 @@ async def list_ingredients(
filters = {}
if category:
filters['category'] = category
if product_type:
filters['product_type'] = product_type
if is_active is not None:
filters['is_active'] = is_active
if is_low_stock is not None: