comment out check billing status & increase free tier mins temp

This commit is contained in:
marko-kraemer 2025-04-23 20:31:51 +01:00
parent e985cbdc2b
commit d4e2665e6b
1 changed files with 11 additions and 11 deletions

View File

@ -82,20 +82,20 @@ async def check_billing_status(client, account_id: str) -> Tuple[bool, str, Opti
# 'plan_name': 'Free' # 'plan_name': 'Free'
# } # }
if not subscription or subscription.get('price_id') is None or subscription.get('price_id') == 'price_1RGJ9GG6l1KZGqIroxSqgphC': # if not subscription or subscription.get('price_id') is None or subscription.get('price_id') == 'price_1RGJ9GG6l1KZGqIroxSqgphC':
return False, "You are not subscribed to any plan. Please upgrade your plan to continue.", subscription # return False, "You are not subscribed to any plan. Please upgrade your plan to continue.", subscription
# Get tier info # # Get tier info
tier_info = SUBSCRIPTION_TIERS.get(subscription['price_id']) # tier_info = SUBSCRIPTION_TIERS.get(subscription['price_id'])
if not tier_info: # if not tier_info:
return False, "Invalid subscription tier", subscription # return False, "Invalid subscription tier", subscription
# Calculate current month's usage # # Calculate current month's usage
current_usage = await calculate_monthly_usage(client, account_id) # current_usage = await calculate_monthly_usage(client, account_id)
# Check if within limits # # Check if within limits
if current_usage >= tier_info['minutes']: # if current_usage >= tier_info['minutes']:
return False, f"Monthly limit of {tier_info['minutes']} minutes reached. Please upgrade your plan or wait until next month.", subscription # return False, f"Monthly limit of {tier_info['minutes']} minutes reached. Please upgrade your plan or wait until next month.", subscription
return True, "OK", subscription return True, "OK", subscription