Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: do not send captcha token for subscription endpoint (#11200)

Kevin Grüneberg94e97a455217
diff --git a/studio/components/interfaces/Billing/Billing.utils.ts b/studio/components/interfaces/Billing/Billing.utils.ts
index 67f98f93e7b..4bad6ed40a7 100644
--- a/studio/components/interfaces/Billing/Billing.utils.ts
+++ b/studio/components/interfaces/Billing/Billing.utils.ts
@@ -52,8 +52,7 @@ export const formSubscriptionUpdatePayload = (
},
nonChangeableAddons: SubscriptionAddon[],
selectedPaymentMethod: string,
- region: string,
- hcaptchaToken: string | undefined
+ region: string
) => {
const { computeSize, pitrDuration, customDomains } = selectedAddons
@@ -78,8 +77,7 @@ export const formSubscriptionUpdatePayload = (
...(tierPriceId && { tier: tierPriceId.id }),
addons,
proration_date,
- payment_method: selectedPaymentMethod,
- hcaptchaToken
+ payment_method: selectedPaymentMethod
}
}
diff --git a/studio/components/interfaces/Billing/EnterpriseUpdate.tsx b/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
index 254d83275c7..969b5d58993 100644
--- a/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
+++ b/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
@@ -114,8 +114,7 @@ const EnterpriseUpdate: FC<Props> = ({
selectedAddons,
nonChangeableAddons,
selectedPaymentMethodId,
- projectRegion,
- undefined
+ projectRegion
),
tier: currentSubscription.tier.price_id,
}
@@ -178,8 +177,7 @@ const EnterpriseUpdate: FC<Props> = ({
selectedAddons,
nonChangeableAddons,
selectedPaymentMethodId,
- projectRegion,
- token ?? undefined
+ projectRegion
),
tier: currentSubscription.tier.price_id,
}
diff --git a/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx b/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx
index 439f5edc6f3..9cda2b5aa30 100644
--- a/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx
+++ b/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx
@@ -109,7 +109,7 @@ const ExitSurvey: FC<Props> = ({ freeTier, subscription, onSelectBack }) => {
setMessage(values.message)
return setShowConfirmModal(true)
} else {
- downgradeProject(values, token as string)
+ downgradeProject(values)
}
}
@@ -118,7 +118,7 @@ const ExitSurvey: FC<Props> = ({ freeTier, subscription, onSelectBack }) => {
captchaRef.current?.resetCaptcha()
}
- const downgradeProject = async (values?: any, hcaptchaToken?: string) => {
+ const downgradeProject = async (values?: any) => {
const downgradeMessage = values?.message ?? message
try {
@@ -132,7 +132,6 @@ const ExitSurvey: FC<Props> = ({ freeTier, subscription, onSelectBack }) => {
tier,
addons,
proration_date,
- hcaptchaToken: captchaToken ?? hcaptchaToken,
})
resetCaptcha()
diff --git a/studio/components/interfaces/Billing/ProUpgrade.tsx b/studio/components/interfaces/Billing/ProUpgrade.tsx
index 2f05f9a8844..b4cf2635051 100644
--- a/studio/components/interfaces/Billing/ProUpgrade.tsx
+++ b/studio/components/interfaces/Billing/ProUpgrade.tsx
@@ -137,8 +137,7 @@ const ProUpgrade: FC<Props> = ({
selectedAddons,
nonChangeableAddons,
selectedPaymentMethodId,
- projectRegion,
- undefined
+ projectRegion
)
setIsRefreshingPreview(true)
@@ -184,8 +183,7 @@ const ProUpgrade: FC<Props> = ({
selectedAddons,
nonChangeableAddons,
selectedPaymentMethodId,
- projectRegion,
- captchaToken ?? undefined
+ projectRegion
)
const res = await patch(`${API_URL}/projects/${projectRef}/subscription`, payload)
resetCaptcha()