REFACTOR ALL APIs fix 1
This commit is contained in:
@@ -17,10 +17,10 @@ router = APIRouter()
|
||||
# SUBSCRIPTION ENDPOINTS - Direct routing to tenant service
|
||||
# ================================================================
|
||||
|
||||
@router.api_route("/subscriptions/{tenant_id}/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
@router.api_route("/tenants/subscriptions/{tenant_id}/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
|
||||
async def proxy_subscription_endpoints(request: Request, tenant_id: str = Path(...), path: str = ""):
|
||||
"""Proxy subscription requests directly to tenant service"""
|
||||
target_path = f"/api/v1/subscriptions/{tenant_id}/{path}".rstrip("/")
|
||||
target_path = f"/api/v1/tenants/subscriptions/{tenant_id}/{path}".rstrip("/")
|
||||
return await _proxy_to_tenant_service(request, target_path)
|
||||
|
||||
@router.api_route("/subscriptions/plans", methods=["GET", "OPTIONS"])
|
||||
|
||||
Reference in New Issue
Block a user