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 index.ts

Steven Tey19a5bb50a653
diff --git a/apps/web/lib/auth/index.ts b/apps/web/lib/auth/index.ts
index 71834d1fba..bd122bfec9 100644
--- a/apps/web/lib/auth/index.ts
+++ b/apps/web/lib/auth/index.ts
@@ -107,14 +107,14 @@ export const withAuth =
apiKey = authorizationHeader.replace("Bearer ", "");
}
- const slug = params?.slug || searchParams.projectSlug;
-
const domain = params?.domain || searchParams.domain;
const key = searchParams.key;
let session: Session | undefined;
let headers = {};
+ const slug = params?.slug || searchParams.projectSlug;
+
// if there's no projectSlug defined
if (!slug) {
// for /api/links (POST /api/links) – allow no session (but warn if user provides apiKey)