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.

Merge branch 'main' into link-folders

Kiran K461e096430b3
diff --cc apps/web/app/api/links/[linkId]/route.ts
index 3bc20e5dd2,86df069e31..c53ca3b32e
--- a/apps/web/app/api/links/[linkId]/route.ts
+++ b/apps/web/app/api/links/[linkId]/route.ts
@@@ -206,22 -172,6 +206,15 @@@ export const DELETE = withWorkspace
linkId: params.linkId,
});
+ if (link.folderId) {
+ await verifyFolderAccess({
+ workspaceId: workspace.id,
+ userId: session.user.id,
+ folderId: link.folderId,
+ requiredPermission: "folders.links.write",
+ });
+ }
+
- if (link.programId) {
- throw new DubApiError({
- code: "forbidden",
- message: "You can't delete a link that's part of a program.",
- });
- }
-
const response = await deleteLink(link.id);
waitUntil(