Fix subscription tier and domain_limit issues
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
- Changed SubscriptionTier.STARTER to SCOUT (correct tier name) - Removed domain_limit from Subscription constructor (it's a computed property) - Database needs to be re-initialized with: python scripts/init_db.py && python scripts/seed_tld_prices.py
This commit is contained in:
@ -60,7 +60,7 @@ async def add_domain(
|
|||||||
if current_user.subscription:
|
if current_user.subscription:
|
||||||
limit = current_user.subscription.max_domains
|
limit = current_user.subscription.max_domains
|
||||||
else:
|
else:
|
||||||
limit = TIER_CONFIG[SubscriptionTier.STARTER]["domain_limit"]
|
limit = TIER_CONFIG[SubscriptionTier.SCOUT]["domain_limit"]
|
||||||
|
|
||||||
current_count = len(current_user.domains)
|
current_count = len(current_user.domains)
|
||||||
|
|
||||||
|
|||||||
@ -98,12 +98,11 @@ class AuthService:
|
|||||||
db.add(user)
|
db.add(user)
|
||||||
await db.flush()
|
await db.flush()
|
||||||
|
|
||||||
# Create default starter subscription
|
# Create default Scout (free) subscription
|
||||||
subscription = Subscription(
|
subscription = Subscription(
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
tier=SubscriptionTier.STARTER,
|
tier=SubscriptionTier.SCOUT,
|
||||||
status=SubscriptionStatus.ACTIVE,
|
status=SubscriptionStatus.ACTIVE,
|
||||||
domain_limit=TIER_CONFIG[SubscriptionTier.STARTER]["domain_limit"],
|
|
||||||
)
|
)
|
||||||
db.add(subscription)
|
db.add(subscription)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user