Add user delete process

This commit is contained in:
Urtzi Alfaro
2025-10-31 11:54:19 +01:00
parent 63f5c6d512
commit 269d3b5032
74 changed files with 16783 additions and 213 deletions

View File

@@ -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"""