chore: remove legacy unlimited prices

This commit is contained in:
Matthias Nannt
2024-07-29 10:19:32 +02:00
parent fe5242174b
commit aa40b916ab
2 changed files with 0 additions and 32 deletions

View File

@@ -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;

View File

@@ -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 = {