feat: prevent lifetime account, disabled

This commit is contained in:
Nevo David 2025-02-03 13:32:57 +07:00
parent 92d09b5660
commit 07e7b4b530
1 changed files with 9 additions and 0 deletions

View File

@ -75,6 +75,10 @@ export class SubscriptionService {
totalChannels: number,
billing: 'FREE' | 'STANDARD' | 'PRO'
) {
if (!customerId) {
return ;
}
const getOrgByCustomerId =
await this._subscriptionRepository.getOrganizationByCustomerId(
customerId
@ -84,6 +88,11 @@ export class SubscriptionService {
(await this._subscriptionRepository.getSubscriptionByCustomerId(
customerId
))!;
if (getCurrentSubscription.isLifetime) {
return ;
}
const from = pricing[getCurrentSubscription?.subscriptionTier || 'FREE'];
const to = pricing[billing];