Add user delete process
This commit is contained in:
@@ -294,6 +294,16 @@ async def proxy_tenant_production(request: Request, tenant_id: str = Path(...),
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/production/{path}".rstrip("/")
|
||||
return await _proxy_to_production_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
# ================================================================
|
||||
# TENANT-SCOPED ORCHESTRATOR SERVICE ENDPOINTS
|
||||
# ================================================================
|
||||
|
||||
@router.api_route("/{tenant_id}/orchestrator/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
async def proxy_tenant_orchestrator(request: Request, tenant_id: str = Path(...), path: str = ""):
|
||||
"""Proxy tenant orchestrator requests to orchestrator service"""
|
||||
target_path = f"/api/v1/tenants/{tenant_id}/orchestrator/{path}".rstrip("/")
|
||||
return await _proxy_to_orchestrator_service(request, target_path, tenant_id=tenant_id)
|
||||
|
||||
# ================================================================
|
||||
# TENANT-SCOPED ORDERS SERVICE ENDPOINTS
|
||||
# ================================================================
|
||||
@@ -438,6 +448,10 @@ async def _proxy_to_alert_processor_service(request: Request, target_path: str,
|
||||
"""Proxy request to alert processor service"""
|
||||
return await _proxy_request(request, target_path, settings.ALERT_PROCESSOR_SERVICE_URL, tenant_id=tenant_id)
|
||||
|
||||
async def _proxy_to_orchestrator_service(request: Request, target_path: str, tenant_id: str = None):
|
||||
"""Proxy request to orchestrator service"""
|
||||
return await _proxy_request(request, target_path, settings.ORCHESTRATOR_SERVICE_URL, tenant_id=tenant_id)
|
||||
|
||||
async def _proxy_request(request: Request, target_path: str, service_url: str, tenant_id: str = None):
|
||||
"""Generic proxy function with enhanced error handling"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user