Skip to content

Scheduling infrastructure for absolutely everyone.

fixes: API builds after rename (#14319)

Omar López7421cea0dacc
diff --git a/apps/api/v1/pages/api/teams/[teamId]/_patch.ts b/apps/api/v1/pages/api/teams/[teamId]/_patch.ts
index 63687a0e154..2e1fcc5ca92 100644
--- a/apps/api/v1/pages/api/teams/[teamId]/_patch.ts
+++ b/apps/api/v1/pages/api/teams/[teamId]/_patch.ts
@@ -1,7 +1,7 @@
import type { Prisma } from "@prisma/client";
import type { NextApiRequest } from "next";
-import { purchaseTeamSubscription } from "@calcom/features/ee/teams/lib/payments";
+import { purchaseTeamOrOrgSubscription } from "@calcom/features/ee/teams/lib/payments";
import { IS_TEAM_BILLING_ENABLED } from "@calcom/lib/constants";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server";
@@ -105,10 +105,11 @@ export async function patchHandler(req: NextApiRequest) {
};
delete data.slug;
if (IS_TEAM_BILLING_ENABLED) {
- const checkoutSession = await purchaseTeamSubscription({
+ const checkoutSession = await purchaseTeamOrOrgSubscription({
teamId: _team.id,
seats: _team.members.length,
userId,
+ pricePerSeat: null,
});
if (!checkoutSession.url)
throw new TRPCError({