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.

disable transfering links (for now)

Steven Tey6acc260f5101
diff --git a/apps/web/app/api/links/[linkId]/route.ts b/apps/web/app/api/links/[linkId]/route.ts
index 1ccaacc701..cb0e662a2b 100644
--- a/apps/web/app/api/links/[linkId]/route.ts
+++ b/apps/web/app/api/links/[linkId]/route.ts
@@ -22,6 +22,16 @@ export const PUT = withAuth(
...body,
};
+ if (updatedLink.projectId !== link?.projectId) {
+ return new Response(
+ "Transferring links to another project is not yet supported.",
+ {
+ status: 403,
+ headers,
+ },
+ );
+ }
+
let { key, url, rewrite } = updatedLink;
// for default dub.sh links (not part of a project)