Improve the inventory page
This commit is contained in:
@@ -186,6 +186,19 @@ async def proxy_tenant_dashboard(request: Request, tenant_id: str = Path(...), p
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/dashboard/{path}".rstrip("/")
|
||||
return await _proxy_to_inventory_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
@router.api_route("/{tenant_id}/transformations", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
async def proxy_tenant_transformations_base(request: Request, tenant_id: str = Path(...)):
|
||||
"""Proxy tenant transformations requests to inventory service (base path)"""
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/transformations"
|
||||
return await _proxy_to_inventory_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
@router.api_route("/{tenant_id}/transformations/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
async def proxy_tenant_transformations_with_path(request: Request, tenant_id: str = Path(...), path: str = ""):
|
||||
"""Proxy tenant transformations requests to inventory service (with additional path)"""
|
||||
# The inventory service transformations endpoints are tenant-scoped: /api/v1/tenants/{tenant_id}/transformations/{path}
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/transformations/{path}".rstrip("/")
|
||||
return await _proxy_to_inventory_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
# ================================================================
|
||||
# TENANT-SCOPED PRODUCTION SERVICE ENDPOINTS
|
||||
# ================================================================
|
||||
|
||||
Reference in New Issue
Block a user