fix: removing apps from team events (#14182)
* fix: removing apps from team events * fix: lnstalling an app to a team enables it on all the team-events by default
This commit is contained in:
@@ -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,
|
||||
@@ -147,6 +157,7 @@ export const deleteCredentialHandler = async ({ ctx, input }: DeleteCredentialOp
|
||||
...metadata?.apps,
|
||||
stripe: {
|
||||
...metadata?.apps?.stripe,
|
||||
enabled: false,
|
||||
price: 0,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user