The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
remove 302 for placeholder page
Steven Teyf9fe7eb35c51
diff --git a/apps/web/lib/middleware/link.ts b/apps/web/lib/middleware/link.tsindex 089adb658e..c8979668df 100644--- a/apps/web/lib/middleware/link.ts+++ b/apps/web/lib/middleware/link.ts@@ -204,7 +204,6 @@ export default async function LinkMiddleware(// we only index root domain links if they're not subdomains...(shouldIndex && { "X-Robots-Tag": "googlebot: noindex" }),},- status: 302,});}diff --git a/apps/web/scripts/migrate-domains.ts b/apps/web/scripts/migrate-domains.tsindex 5b82c77765..bf6e2ac379 100644--- a/apps/web/scripts/migrate-domains.ts+++ b/apps/web/scripts/migrate-domains.ts@@ -9,6 +9,7 @@ async function main() {select: {id: true,plan: true,+ slug: true,users: {select: {userId: true,@@ -18,12 +19,15 @@ async function main() {},},},- skip: 0,+ skip: 4000,take: 1000, // TODO: Adjust this based on the number of domains});// Create links for each domainconst newLinks = domains.map((domain) => {+ if (domain.project?.users.length === 0) {+ console.log(`project ${domain.project.slug} has no users`);+ }return {id: domain.id,domain: domain.slug,@@ -32,7 +36,7 @@ async function main() {description: domain.description,publicStats: domain.publicStats,projectId: domain.projectId,- userId: domain.project?.users[0].userId,+ userId: domain.project?.users[0]?.userId || null,createdAt: domain.createdAt,lastClicked: domain.lastClicked,clicks: domain.clicks,