Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update route.ts

Kiran K88279c915f7a
diff --git a/apps/web/app/api/webhooks/[webhookId]/route.ts b/apps/web/app/api/webhooks/[webhookId]/route.ts
index a62a444e99..3739906f99 100644
--- a/apps/web/app/api/webhooks/[webhookId]/route.ts
+++ b/apps/web/app/api/webhooks/[webhookId]/route.ts
@@ -267,24 +267,13 @@ export const DELETE = withWorkspace(
async ({ workspace, params }) => {
const { webhookId } = params;
- const webhook = await prisma.webhook.findUniqueOrThrow({
+ await prisma.webhook.findUniqueOrThrow({
where: {
id: webhookId,
projectId: workspace.id,
},
- select: {
- installationId: true,
- },
});
- if (webhook.installationId) {
- throw new DubApiError({
- code: "bad_request",
- message:
- "This webhook is managed by an integration, hence cannot be deleted manually.",
- });
- }
-
const linkWebhooks = await prisma.linkWebhook.findMany({
where: {
webhookId,