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.

small fixes

Steven Tey97fda8f37fdf
diff --git a/apps/web/lib/analytics.ts b/apps/web/lib/analytics.ts
index 023c441f1c..b955ca11bb 100644
--- a/apps/web/lib/analytics.ts
+++ b/apps/web/lib/analytics.ts
@@ -127,7 +127,7 @@ export const getAnalytics = async ({
[linkId],
);
if (response.rows.length === 0) {
- return "0";
+ return 0;
}
return response.rows[0]["clicks"];
}
@@ -182,7 +182,7 @@ export const getAnalytics = async ({
if (endpoint === "clicks") {
try {
const clicks = data[0]["count()"];
- return clicks || "0";
+ return clicks || 0;
} catch (e) {
console.log(e);
}
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.ts
index 659504f3b8..639c700381 100644
--- a/apps/web/lib/api/links.ts
+++ b/apps/web/lib/api/links.ts
@@ -796,7 +796,10 @@ export async function transferLink({
},
data: {
projectId: newProjectId,
- tagId: null, // remove tags when transferring link
+ // remove tags when transferring link
+ tags: {
+ deleteMany: {},
+ },
},
});
}
diff --git a/apps/web/scripts/sync-link-tags.ts b/apps/web/scripts/sync-link-tags.ts
index 80189275f0..1356181ac4 100644
--- a/apps/web/scripts/sync-link-tags.ts
+++ b/apps/web/scripts/sync-link-tags.ts
@@ -15,7 +15,7 @@ async function main() {
none: {},
},
},
- take: 1000,
+ take: 5000,
});
// make sure all tagId exist