diff --git a/src/jobs/twitter.ts b/src/jobs/twitter.ts index e178a13..cdeed3b 100644 --- a/src/jobs/twitter.ts +++ b/src/jobs/twitter.ts @@ -13,7 +13,7 @@ export const job: Job = { ) .then((v) => v.json()) .then((v) => (v as Record).items as Record[]) - .then((v) => v.map((f) => f.url)) + .then((v) => v.map((f) => f.url.replace('twitter.com', 'vxtwitter.com'))) .catch(log); if (!res?.length) return; @@ -32,6 +32,7 @@ export const job: Job = { link, }); } + if (!links.length) return; await prisma.cache.update({ where: {