diff --git a/services/orchestrator/app/api/dashboard.py b/services/orchestrator/app/api/dashboard.py index 483db79f..4bf7bdb6 100644 --- a/services/orchestrator/app/api/dashboard.py +++ b/services/orchestrator/app/api/dashboard.py @@ -392,10 +392,7 @@ async def get_production_timeline( # Fetch today's production batches batches = [] try: - batch_data = await production_client.get( - "/production/production-batches/today", - tenant_id=tenant_id - ) + batch_data = await production_client.get_todays_batches(tenant_id) if batch_data: batches = batch_data.get("batches", []) except Exception as e: @@ -442,20 +439,14 @@ async def get_insights( # Sustainability data sustainability_data = {} try: - sustainability_data = await inventory_client.get( - "/inventory/sustainability/widget", - tenant_id=tenant_id - ) or {} + sustainability_data = await inventory_client.get_sustainability_widget(tenant_id) or {} except Exception as e: logger.warning(f"Failed to fetch sustainability data: {e}") # Inventory data inventory_data = {} try: - raw_inventory_data = await inventory_client.get( - "/inventory/dashboard/stock-status", - tenant_id=tenant_id - ) + raw_inventory_data = await inventory_client.get_stock_status(tenant_id) # Handle case where API returns a list instead of dict if isinstance(raw_inventory_data, dict): inventory_data = raw_inventory_data