From 5987f6b2cdddca98bdeec3e633a2b8de3ccb6e8e Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 17 Feb 2026 21:55:57 -0800 Subject: [PATCH] Allow enterprise --- server/private/lib/billing/getOrgTierData.ts | 3 ++- src/lib/api/isOrgSubscribed.ts | 2 +- src/providers/SubscriptionStatusProvider.tsx | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/server/private/lib/billing/getOrgTierData.ts b/server/private/lib/billing/getOrgTierData.ts index d87f2c38..9972dcfc 100644 --- a/server/private/lib/billing/getOrgTierData.ts +++ b/server/private/lib/billing/getOrgTierData.ts @@ -78,7 +78,8 @@ export async function getOrgTierData( if ( subscription.type === "tier1" || subscription.type === "tier2" || - subscription.type === "tier3" + subscription.type === "tier3" || + subscription.type === "enterprise" ) { tier = subscription.type; active = true; diff --git a/src/lib/api/isOrgSubscribed.ts b/src/lib/api/isOrgSubscribed.ts index b57810cb..ce19b917 100644 --- a/src/lib/api/isOrgSubscribed.ts +++ b/src/lib/api/isOrgSubscribed.ts @@ -20,7 +20,7 @@ export const isOrgSubscribed = cache(async (orgId: string) => { try { const subRes = await getCachedSubscription(orgId); subscribed = - (subRes.data.data.tier == "tier1" || subRes.data.data.tier == "tier2" || subRes.data.data.tier == "tier3") && + (subRes.data.data.tier == "tier1" || subRes.data.data.tier == "tier2" || subRes.data.data.tier == "tier3" || subRes.data.data.tier == "enterprise") && subRes.data.data.active; } catch {} } diff --git a/src/providers/SubscriptionStatusProvider.tsx b/src/providers/SubscriptionStatusProvider.tsx index 27e90fff..a105e5d5 100644 --- a/src/providers/SubscriptionStatusProvider.tsx +++ b/src/providers/SubscriptionStatusProvider.tsx @@ -42,7 +42,8 @@ export function SubscriptionStatusProvider({ if ( subscription.type == "tier1" || subscription.type == "tier2" || - subscription.type == "tier3" + subscription.type == "tier3" || + subscription.type == "enterprise" ) { return { tier: subscription.type, @@ -61,7 +62,7 @@ export function SubscriptionStatusProvider({ const isSubscribed = () => { const { tier, active } = getTier(); return ( - (tier == "tier1" || tier == "tier2" || tier == "tier3") && + (tier == "tier1" || tier == "tier2" || tier == "tier3" || tier == "enterprise") && active ); };