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.

fix the public link creation

Kiran Kc5e39cce386a
diff --git a/apps/web/app/api/links/route.ts b/apps/web/app/api/links/route.ts
index f5ddf87268..39394866f3 100644
--- a/apps/web/app/api/links/route.ts
+++ b/apps/web/app/api/links/route.ts
@@ -55,7 +55,9 @@ export const GET = withWorkspace(async ({ req, headers, workspace }) => {
// POST /api/links – create a new link
export const POST = withWorkspace(
async ({ req, headers, session, workspace }) => {
- throwIfLinksUsageExceeded(workspace);
+ if (workspace) {
+ throwIfLinksUsageExceeded(workspace);
+ }
const body = createLinkBodySchema.parse(await parseRequestBody(req));