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 logs again

Steven Tey684fad85c6b6
diff --git a/apps/web/app/api/cron/import/bitly/utils.ts b/apps/web/app/api/cron/import/bitly/utils.ts
index 081539f257..1a81413b69 100644
--- a/apps/web/app/api/cron/import/bitly/utils.ts
+++ b/apps/web/app/api/cron/import/bitly/utils.ts
@@ -188,7 +188,11 @@ export const importLinksFromBitly = async ({
console.log(`Invalid links: ${invalidLinks.length}`);
console.log(JSON.stringify(invalidLinks, null, 2));
- console.log(`Successfully imported ${importedLinks.length} new links!);
+
+ const finalImportedLink = importedLinks[importedLinks.length - 1];
+ console.log(
+ `Successfully imported ${importedLinks.length} new links! Final imported link: ${finalImportedLink.shortLink} (${new Date(finalImportedLink.createdAt).toISOString()})`,
+ );
if (nextSearchAfter === "") {
const workspace = await prisma.project.findUnique({
diff --git a/apps/web/app/api/cron/migrate/route.ts b/apps/web/app/api/cron/migrate/route.ts
index 3cd54b0b4d..ef49e516bb 100644
--- a/apps/web/app/api/cron/migrate/route.ts
+++ b/apps/web/app/api/cron/migrate/route.ts
@@ -57,8 +57,9 @@ export async function POST(req: Request) {
});
console.log(`Deleted ${links.length} links`);
+ const finalDeletedLink = links[links.length - 1];
console.log(
- `Final deleted link timestamp: ${new Date(links[links.length - 1].createdAt).toISOString()}`,
+ `Final deleted link: ${finalDeletedLink.key} (${new Date(finalDeletedLink.createdAt).toISOString()})`,
);
// await qstash.publishJSON({
@@ -68,6 +69,6 @@ export async function POST(req: Request) {
// });
return NextResponse.json({
- status: `Deleted ${links.length} links. Final deleted link timestamp: ${new Date(links[links.length - 1].createdAt).toISOString()}`,
+ status: `Deleted ${links.length} links. Final deleted link: ${finalDeletedLink.key} (${new Date(finalDeletedLink.createdAt).toISOString()})`,
});
}