Add subcription level filtering
This commit is contained in:
@@ -39,7 +39,6 @@ def get_subscription_repository():
|
||||
raise HTTPException(status_code=500, detail="Repository initialization failed")
|
||||
|
||||
@router.get("/subscriptions/{tenant_id}/limits")
|
||||
@track_endpoint_metrics("subscription_get_limits")
|
||||
async def get_subscription_limits(
|
||||
tenant_id: UUID = Path(..., description="Tenant ID"),
|
||||
current_user: Dict[str, Any] = Depends(get_current_user_dep),
|
||||
@@ -62,7 +61,6 @@ async def get_subscription_limits(
|
||||
)
|
||||
|
||||
@router.get("/subscriptions/{tenant_id}/usage")
|
||||
@track_endpoint_metrics("subscription_get_usage")
|
||||
async def get_usage_summary(
|
||||
tenant_id: UUID = Path(..., description="Tenant ID"),
|
||||
current_user: Dict[str, Any] = Depends(get_current_user_dep),
|
||||
@@ -85,7 +83,6 @@ async def get_usage_summary(
|
||||
)
|
||||
|
||||
@router.get("/subscriptions/{tenant_id}/can-add-location")
|
||||
@track_endpoint_metrics("subscription_check_location_limit")
|
||||
async def can_add_location(
|
||||
tenant_id: UUID = Path(..., description="Tenant ID"),
|
||||
current_user: Dict[str, Any] = Depends(get_current_user_dep),
|
||||
@@ -108,7 +105,6 @@ async def can_add_location(
|
||||
)
|
||||
|
||||
@router.get("/subscriptions/{tenant_id}/can-add-product")
|
||||
@track_endpoint_metrics("subscription_check_product_limit")
|
||||
async def can_add_product(
|
||||
tenant_id: UUID = Path(..., description="Tenant ID"),
|
||||
current_user: Dict[str, Any] = Depends(get_current_user_dep),
|
||||
@@ -131,7 +127,6 @@ async def can_add_product(
|
||||
)
|
||||
|
||||
@router.get("/subscriptions/{tenant_id}/can-add-user")
|
||||
@track_endpoint_metrics("subscription_check_user_limit")
|
||||
async def can_add_user(
|
||||
tenant_id: UUID = Path(..., description="Tenant ID"),
|
||||
current_user: Dict[str, Any] = Depends(get_current_user_dep),
|
||||
@@ -154,7 +149,6 @@ async def can_add_user(
|
||||
)
|
||||
|
||||
@router.get("/subscriptions/{tenant_id}/features/{feature}")
|
||||
@track_endpoint_metrics("subscription_check_feature")
|
||||
async def has_feature(
|
||||
tenant_id: UUID = Path(..., description="Tenant ID"),
|
||||
feature: str = Path(..., description="Feature name"),
|
||||
@@ -179,7 +173,6 @@ async def has_feature(
|
||||
)
|
||||
|
||||
@router.get("/subscriptions/{tenant_id}/validate-upgrade/{new_plan}")
|
||||
@track_endpoint_metrics("subscription_validate_upgrade")
|
||||
async def validate_plan_upgrade(
|
||||
tenant_id: UUID = Path(..., description="Tenant ID"),
|
||||
new_plan: str = Path(..., description="New plan name"),
|
||||
@@ -204,7 +197,6 @@ async def validate_plan_upgrade(
|
||||
)
|
||||
|
||||
@router.post("/subscriptions/{tenant_id}/upgrade")
|
||||
@track_endpoint_metrics("subscription_upgrade_plan")
|
||||
async def upgrade_subscription_plan(
|
||||
tenant_id: UUID = Path(..., description="Tenant ID"),
|
||||
new_plan: str = Query(..., description="New plan name"),
|
||||
@@ -250,7 +242,6 @@ async def upgrade_subscription_plan(
|
||||
)
|
||||
|
||||
@router.get("/plans/available")
|
||||
@track_endpoint_metrics("subscription_get_available_plans")
|
||||
async def get_available_plans():
|
||||
"""Get all available subscription plans with features and pricing"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user