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.

bulkDeleteLinks - workspaceId no longer needed

Kiran K250ac0dadd07
diff --git a/apps/web/app/api/cron/cleanup/route.ts b/apps/web/app/api/cron/cleanup/route.ts
index bca3465092..aa71130cea 100644
--- a/apps/web/app/api/cron/cleanup/route.ts
+++ b/apps/web/app/api/cron/cleanup/route.ts
@@ -65,7 +65,6 @@ export async function GET(req: Request) {
// Post delete cleanup
await bulkDeleteLinks({
links,
- workspaceId: E2E_WORKSPACE_ID,
});
}
diff --git a/apps/web/app/api/cron/workspaces/delete/route.ts b/apps/web/app/api/cron/workspaces/delete/route.ts
index 6567ea90c3..a0bc8413a3 100644
--- a/apps/web/app/api/cron/workspaces/delete/route.ts
+++ b/apps/web/app/api/cron/workspaces/delete/route.ts
@@ -53,7 +53,6 @@ export async function POST(req: Request) {
}),
bulkDeleteLinks({
- workspaceId: workspace.id,
links,
}),
]);
diff --git a/apps/web/app/api/links/bulk/route.ts b/apps/web/app/api/links/bulk/route.ts
index b88d6bd5aa..db5a774082 100644
--- a/apps/web/app/api/links/bulk/route.ts
+++ b/apps/web/app/api/links/bulk/route.ts
@@ -409,7 +409,6 @@ export const DELETE = withWorkspace(
waitUntil(
bulkDeleteLinks({
links,
- workspaceId: workspace.id,
}),
);
diff --git a/apps/web/lib/api/links/bulk-delete-links.ts b/apps/web/lib/api/links/bulk-delete-links.ts
index 140b5e7d4a..8a294416a4 100644
--- a/apps/web/lib/api/links/bulk-delete-links.ts
+++ b/apps/web/lib/api/links/bulk-delete-links.ts
@@ -6,10 +6,8 @@ import { linkCache } from "./cache";
export async function bulkDeleteLinks({
links,
- workspaceId,
}: {
links: (Link & { tags: { tagId: string }[] })[];
- workspaceId: string;
}) {
if (links.length === 0) {
return;