Add frontend imporvements
This commit is contained in:
@@ -157,12 +157,19 @@ 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)
|
||||
|
||||
@router.api_route("/{tenant_id}/ingredients{path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
@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"""
|
||||
# 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("/")
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/ingredients/{path}".rstrip("/")
|
||||
return await _proxy_to_inventory_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
@router.api_route("/{tenant_id}/stock/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
async def proxy_tenant_stock(request: Request, tenant_id: str = Path(...), path: str = ""):
|
||||
"""Proxy tenant stock requests to inventory service"""
|
||||
# The inventory service stock endpoints are now tenant-scoped: /api/v1/tenants/{tenant_id}/stock/{path}
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/stock/{path}".rstrip("/")
|
||||
return await _proxy_to_inventory_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
# ================================================================
|
||||
|
||||
Reference in New Issue
Block a user