From ef3838b4764cf57d9928fa6581f814652627248b Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Wed, 8 Jun 2022 13:20:09 +0530 Subject: [PATCH 1/2] hotfix ctx removal --- pages/api/hooks/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/hooks/index.ts b/pages/api/hooks/index.ts index e92a681080..f3f3257499 100644 --- a/pages/api/hooks/index.ts +++ b/pages/api/hooks/index.ts @@ -62,7 +62,7 @@ async function createOrlistAllWebhooks( return; } if (safe.data.eventTypeId) { - const team = await ctx.prisma.team.findFirst({ + const team = await prisma.team.findFirst({ where: { eventTypes: { some: { From b881312f1038ea9b67afa52c6a01a9c3c07f8028 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Wed, 8 Jun 2022 13:20:44 +0530 Subject: [PATCH 2/2] hotfix ctx removal --- pages/api/hooks/[id].ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/hooks/[id].ts b/pages/api/hooks/[id].ts index 3a14efa592..7debc7ac8d 100644 --- a/pages/api/hooks/[id].ts +++ b/pages/api/hooks/[id].ts @@ -96,7 +96,7 @@ export async function WebhookById( } } if (safeBody.data.eventTypeId) { - const team = await ctx.prisma.team.findFirst({ + const team = await prisma.team.findFirst({ where: { eventTypes: { some: {