Support subcription payments
This commit is contained in:
@@ -25,7 +25,7 @@ jwt_handler = JWTHandler(settings.JWT_SECRET_KEY, settings.JWT_ALGORITHM)
|
||||
# Routes that don't require authentication
|
||||
PUBLIC_ROUTES = [
|
||||
"/health",
|
||||
"/metrics",
|
||||
"/metrics",
|
||||
"/docs",
|
||||
"/redoc",
|
||||
"/openapi.json",
|
||||
@@ -33,7 +33,8 @@ PUBLIC_ROUTES = [
|
||||
"/api/v1/auth/register",
|
||||
"/api/v1/auth/refresh",
|
||||
"/api/v1/auth/verify",
|
||||
"/api/v1/nominatim/search"
|
||||
"/api/v1/nominatim/search",
|
||||
"/api/v1/plans"
|
||||
]
|
||||
|
||||
class AuthMiddleware(BaseHTTPMiddleware):
|
||||
|
||||
@@ -26,7 +26,13 @@ async def proxy_subscription_endpoints(request: Request, tenant_id: str = Path(.
|
||||
@router.api_route("/subscriptions/plans", methods=["GET", "OPTIONS"])
|
||||
async def proxy_subscription_plans(request: Request):
|
||||
"""Proxy subscription plans request to tenant service"""
|
||||
target_path = "/api/v1/plans/available"
|
||||
target_path = "/api/v1/plans"
|
||||
return await _proxy_to_tenant_service(request, target_path)
|
||||
|
||||
@router.api_route("/plans", methods=["GET", "OPTIONS"])
|
||||
async def proxy_plans(request: Request):
|
||||
"""Proxy plans request to tenant service"""
|
||||
target_path = "/api/v1/plans"
|
||||
return await _proxy_to_tenant_service(request, target_path)
|
||||
|
||||
# ================================================================
|
||||
|
||||
Reference in New Issue
Block a user