diff --git a/apps/api/pages/api/webhooks/[id]/_patch.ts b/apps/api/pages/api/webhooks/[id]/_patch.ts index 0a9b63f0de..073a7f0704 100644 --- a/apps/api/pages/api/webhooks/[id]/_patch.ts +++ b/apps/api/pages/api/webhooks/[id]/_patch.ts @@ -92,7 +92,7 @@ export async function patchHandler(req: NextApiRequest) { args.data.userId = bodyUserId; } - if (args.data.eventTriggers) { + if (eventTriggers) { const eventTriggersSet = new Set(eventTriggers); args.data.eventTriggers = Array.from(eventTriggersSet); } diff --git a/apps/api/pages/api/webhooks/_post.ts b/apps/api/pages/api/webhooks/_post.ts index e08d59d29d..05e46d3a95 100644 --- a/apps/api/pages/api/webhooks/_post.ts +++ b/apps/api/pages/api/webhooks/_post.ts @@ -92,7 +92,7 @@ async function postHandler(req: NextApiRequest) { args.data.userId = bodyUserId; } - if (args.data.eventTriggers) { + if (eventTriggers) { const eventTriggersSet = new Set(eventTriggers); args.data.eventTriggers = Array.from(eventTriggersSet); }