File tree 1 file changed +3
-2
lines changed
apps/api/v1/pages/api/teams/[teamId]
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import type { Prisma } from "@prisma/client" ;
2
2
import type { NextApiRequest } from "next" ;
3
3
4
- import { purchaseTeamSubscription } from "@calcom/features/ee/teams/lib/payments" ;
4
+ import { purchaseTeamOrOrgSubscription } from "@calcom/features/ee/teams/lib/payments" ;
5
5
import { IS_TEAM_BILLING_ENABLED } from "@calcom/lib/constants" ;
6
6
import { HttpError } from "@calcom/lib/http-error" ;
7
7
import { defaultResponder } from "@calcom/lib/server" ;
@@ -105,10 +105,11 @@ export async function patchHandler(req: NextApiRequest) {
105
105
} ;
106
106
delete data . slug ;
107
107
if ( IS_TEAM_BILLING_ENABLED ) {
108
- const checkoutSession = await purchaseTeamSubscription ( {
108
+ const checkoutSession = await purchaseTeamOrOrgSubscription ( {
109
109
teamId : _team . id ,
110
110
seats : _team . members . length ,
111
111
userId,
112
+ pricePerSeat : null ,
112
113
} ) ;
113
114
if ( ! checkoutSession . url )
114
115
throw new TRPCError ( {
You can’t perform that action at this time.
0 commit comments