Skip to content

Commit

Permalink
fix: removing apps from team events (calcom#14182)
Browse files Browse the repository at this point in the history
* fix: removing apps from team events

* fix: lnstalling an app to a team enables it on all the team-events by default
  • Loading branch information
SomayChauhan authored Mar 22, 2024
1 parent fbff9a9 commit 9acc21d
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,17 @@ export const deleteCredentialHandler = async ({ ctx, input }: DeleteCredentialOp

const eventTypes = await prisma.eventType.findMany({
where: {
userId: ctx.user.id,
OR: [
{
...(teamId ? { teamId } : { userId: ctx.user.id }),
},
// for managed events
{
parent: {
teamId,
},
},
],
},
select: {
id: true,
Expand Down Expand Up @@ -147,6 +157,7 @@ export const deleteCredentialHandler = async ({ ctx, input }: DeleteCredentialOp
...metadata?.apps,
stripe: {
...metadata?.apps?.stripe,
enabled: false,
price: 0,
},
},
Expand Down

0 comments on commit 9acc21d

Please sign in to comment.