From 7421cea0dacc5d2efa96b3d2d8cbfcc8cb9a3043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Wed, 3 Apr 2024 16:12:09 -0700 Subject: [PATCH] fixes: API builds after rename (#14319) --- apps/api/v1/pages/api/teams/[teamId]/_patch.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/api/v1/pages/api/teams/[teamId]/_patch.ts b/apps/api/v1/pages/api/teams/[teamId]/_patch.ts index 63687a0e15..2e1fcc5ca9 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({