mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-29 18:00:26 -06:00
chore: remove legacy unlimited prices
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { STRIPE_PRICE_LOOKUP_KEYS } from "@formbricks/lib/constants";
|
||||
import { getOrganizationByEnvironmentId } from "@formbricks/lib/organization/service";
|
||||
import { upgradePlanAction } from "../actions";
|
||||
|
||||
const Page = async ({ params }) => {
|
||||
const organization = await getOrganizationByEnvironmentId(params.environmentId);
|
||||
if (!organization) {
|
||||
throw new Error("Organization not found");
|
||||
}
|
||||
|
||||
const { status, newPlan, url } = await upgradePlanAction(
|
||||
organization.id,
|
||||
params.environmentId,
|
||||
STRIPE_PRICE_LOOKUP_KEYS.UNLIMITED_199
|
||||
);
|
||||
|
||||
if (status != 200) {
|
||||
throw new Error("Something went wrong");
|
||||
}
|
||||
if (newPlan && url) {
|
||||
redirect(url);
|
||||
} else if (!newPlan) {
|
||||
redirect(`/billing-confirmation?environmentId=${params.environmentId}`);
|
||||
} else {
|
||||
throw new Error("Something went wrong");
|
||||
}
|
||||
};
|
||||
|
||||
export default Page;
|
||||
@@ -193,8 +193,6 @@ export enum STRIPE_PRICE_LOOKUP_KEYS {
|
||||
STARTUP_YEARLY = "formbricks_startup_yearly",
|
||||
SCALE_MONTHLY = "formbricks_scale_monthly",
|
||||
SCALE_YEARLY = "formbricks_scale_yearly",
|
||||
UNLIMITED_99 = "formbricks_unlimited_99",
|
||||
UNLIMITED_199 = "formbricks_unlimited_199",
|
||||
}
|
||||
|
||||
export const BILLING_LIMITS = {
|
||||
|
||||
Reference in New Issue
Block a user