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.

script update

Steven Teyea46391b27c0
diff --git a/apps/web/scripts/download-links.ts b/apps/web/scripts/download-links.ts
index 9877e29957..51ad3590e3 100644
--- a/apps/web/scripts/download-links.ts
+++ b/apps/web/scripts/download-links.ts
@@ -12,23 +12,28 @@ async function main() {
projectId,
},
select: {
- key: true,
domain: true,
+ key: true,
url: true,
+ clicks: true,
+ createdAt: true,
},
orderBy: {
createdAt: "asc",
},
- skip: 99999,
});
- const processedLinks = links.map(({ key, domain, url }) => ({
- link: linkConstructor({
- domain,
- key,
+ const processedLinks = links.map(
+ ({ key, domain, url, clicks, createdAt }) => ({
+ link: linkConstructor({
+ domain,
+ key,
+ }),
+ url,
+ clicks,
+ createdAt: createdAt.toISOString(),
}),
- url,
- }));
+ );
fs.writeFileSync("xxx.csv", Papa.unparse(processedLinks));
}