aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2022-12-11 12:22:36 +0000
committerRuben Beltran del Rio <ruben@unlimited.pizza>2022-12-11 12:22:36 +0000
commit28414efe202e391d22012590c932f676f80c3323 (patch)
tree03c3c4a6fb7313eb1028f4dfb01d48b036c47b0d
parent096cf8b12b95bb5c8bacdea03e695fd787cee025 (diff)
Use all instead of get
-rw-r--r--index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/index.js b/index.js
index b6c3e10..c0e41dc 100644
--- a/index.js
+++ b/index.js
@@ -33,12 +33,12 @@ async function run() {
const pins = await getPins({ tag: 'linkblog' });
- if (pins.posts.length === 0) {
+ if (pins.length === 0) {
console.error('No links to post');
return;
}
- const gemtext = internals.generateGemtext(pins.posts);
+ const gemtext = internals.generateGemtext(pins);
const gemfile = resolve(join(__dirname, `linkblog-${internals.date}.gmi`));
await writeFile(gemfile, gemtext);
await internals.exec(`blog --add ${gemfile}`);
@@ -46,7 +46,7 @@ async function run() {
await internals.exec(`blog --publish-archive ${internals.archiveUrl}`);
await rm(gemfile);
- for (const pin of pins.posts) {
+ for (const pin of pins) {
await addPin({
url: pin.href,
description: pin.description,