mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
feat: support team webhooks
This commit is contained in:
@ -14,6 +14,10 @@ export const getAllWebhooksByEventTrigger = async ({
|
||||
}: GetAllWebhooksByEventTriggerOptions) => {
|
||||
return prisma.webhook.findMany({
|
||||
where: {
|
||||
enabled: true,
|
||||
eventTriggers: {
|
||||
has: event,
|
||||
},
|
||||
...(teamId
|
||||
? {
|
||||
team: {
|
||||
@ -29,10 +33,6 @@ export const getAllWebhooksByEventTrigger = async ({
|
||||
userId,
|
||||
teamId: null,
|
||||
}),
|
||||
eventTriggers: {
|
||||
has: event,
|
||||
},
|
||||
enabled: true,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user