Fix UI for inventory page
This commit is contained in:
@@ -157,9 +157,16 @@ async def proxy_tenant_inventory(request: Request, tenant_id: str = Path(...), p
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/inventory/{path}".rstrip("/")
|
||||
return await _proxy_to_inventory_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
# Specific route for ingredients without additional path
|
||||
@router.api_route("/{tenant_id}/ingredients", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
async def proxy_tenant_ingredients_base(request: Request, tenant_id: str = Path(...)):
|
||||
"""Proxy tenant ingredient requests to inventory service (base path)"""
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/ingredients"
|
||||
return await _proxy_to_inventory_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
@router.api_route("/{tenant_id}/ingredients/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
async def proxy_tenant_ingredients(request: Request, tenant_id: str = Path(...), path: str = ""):
|
||||
"""Proxy tenant ingredient requests to inventory service"""
|
||||
async def proxy_tenant_ingredients_with_path(request: Request, tenant_id: str = Path(...), path: str = ""):
|
||||
"""Proxy tenant ingredient requests to inventory service (with additional path)"""
|
||||
# The inventory service ingredient endpoints are now tenant-scoped: /api/v1/tenants/{tenant_id}/ingredients/{path}
|
||||
# Keep the full tenant path structure
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/ingredients/{path}".rstrip("/")
|
||||
|
||||
Reference in New Issue
Block a user