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 K22671023110d
diff --git a/apps/web/app/api/integrations/uninstall/route.ts b/apps/web/app/api/integrations/uninstall/route.ts
index 63672ef6bf..3bf44c3d93 100644
--- a/apps/web/app/api/integrations/uninstall/route.ts
+++ b/apps/web/app/api/integrations/uninstall/route.ts
@@ -35,8 +35,8 @@ export const DELETE = withWorkspace(
});
}
- const { integrationId, webhooks } = await prisma.installedIntegration.delete(
- {
+ const { integrationId, webhooks } =
+ await prisma.installedIntegration.delete({
where: {
id: installationId,
},
@@ -49,9 +49,7 @@ export const DELETE = withWorkspace(
},
},
},
- },
- );
-
+ });
waitUntil(
Promise.all([
@@ -59,9 +57,9 @@ export const DELETE = withWorkspace(
? [uninstallSlackIntegration({ installation })]
: []),
- ...(webhooks.map((webhook) => isLinkLevelWebhook(webhook)
- ? [webhookCache.delete(webhook.id)]
- : []),
+ ...webhooks.map((webhook) =>
+ isLinkLevelWebhook(webhook) ? webhookCache.delete(webhook.id) : null,
+ ),
]),
);