From f28e1b9f34640e10ec078b9c9db35b9a729f203b Mon Sep 17 00:00:00 2001 From: Tykayn Date: Tue, 22 Nov 2022 10:14:55 +0100 Subject: [PATCH] random number in tkblog post --- helpers/tkblogPost.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/tkblogPost.js b/helpers/tkblogPost.js index 83b20fd..fc02ccd 100644 --- a/helpers/tkblogPost.js +++ b/helpers/tkblogPost.js @@ -1,7 +1,7 @@ import fs from "fs"; import path from 'path'; -import {sendPostMastodon} from './utils.mjs' +import {randomIntFromInterval, sendPostMastodon} from './utils.mjs' const __dirname = path.resolve(); const tkpostsjson = JSON.parse(fs.readFileSync(__dirname + "/assets/documents/tykayn_wptkblog_posts.json", 'utf-8')) @@ -35,7 +35,7 @@ function postLink() { let configPost = { author: 'tykayn', - image: 'tk_blog_bannieres_oct2010-1.jpg', + image: 'tk_blog_bannieres_oct2010-'+randomIntFromInterval(1-10)+'.jpg', message: `# [${postObject.post_title}](${postObject.guid}) * ${postObject.post_date} - ${postObject.guid}