fix: platform plan name is always uppercase (#15215)

This commit is contained in:
Morgan
2024-05-28 08:17:42 +00:00
committed by GitHub
parent 30f9f19a9f
commit 17c4a10e33
2 changed files with 2 additions and 2 deletions
@@ -122,7 +122,7 @@ export class BillingController {
await this.billingService.setSubscriptionForTeam(
teamId,
subscription,
PlatformPlan[plan as keyof typeof PlatformPlan]
PlatformPlan[plan.toUpperCase() as keyof typeof PlatformPlan]
);
return {
@@ -11,7 +11,7 @@ export class BillingConfigService {
const planKeys = Object.keys(PlatformPlan).filter((key) => isNaN(Number(key)));
for (const key of planKeys) {
this.config.set(
PlatformPlan[key as keyof typeof PlatformPlan],
PlatformPlan[key.toUpperCase() as keyof typeof PlatformPlan],
process.env[`STRIPE_PRICE_ID_${key}`] ?? ""
);
}