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 bitly importer bug

Steven Tey5678ade1757b
diff --git a/apps/web/app/api/cron/import/bitly/utils.ts b/apps/web/app/api/cron/import/bitly/utils.ts
index e1c7c463e8..d172343898 100644
--- a/apps/web/app/api/cron/import/bitly/utils.ts
+++ b/apps/web/app/api/cron/import/bitly/utils.ts
@@ -51,6 +51,9 @@ export const importLinksFromBitly = async ({
custom_bitlinks,
tags,
}) => {
+ if (!id || !url) {
+ return [];
+ }
const [domain, key] = id.split("/");
// if domain is not in project domains, skip (could be a bit.ly link or old short domain)
if (!domains.includes(domain)) {
@@ -97,7 +100,7 @@ export const importLinksFromBitly = async ({
);
// bulk create links
- await bulkCreateLinks({ links: importedLinks });
+ // await bulkCreateLinks({ links: importedLinks });
count += importedLinks.length;