From 9b4c0e76bf765e694fa0121fbcd23f77b31e2fcc Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 21 Jan 2022 20:55:53 +0400 Subject: [PATCH] Rename getPostsX() to just getPost that returns all posts. mindflowDateToId renamed to date_id. --- homepage/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homepage/index.js b/homepage/index.js index bcc73b4..7b3c1ed 100644 --- a/homepage/index.js +++ b/homepage/index.js @@ -54,7 +54,7 @@ function setRoutes() { doctype: 'xml', schemahost: `${ctx.header.schema}://${ctx.header.host}`, author: "me@arav.top (Alexander \"Arav\" Andreev)", - items: await mindflow.getPostsForRSS() + items: await mindflow.getPosts() }) }) .get('/stuff', async ctx => { @@ -71,8 +71,7 @@ function setRoutes() { description: "Here I will post updates on my infrastructure, my very important opinions and thoughts.", files_site: util.getServiceByHost(ctx.request.host, "files"), tz: util.getClientTimezone(ctx), - diary: await mindflow.getPosts("Diary"), - updates: await mindflow.getPosts("Update") + posts: await mindflow.getPosts() }) }) .get('/stuff/article/:article', async ctx => { @@ -141,7 +140,7 @@ const pug = new koaPug({ viewPath: path.join(__dirname, "views"), locals: { date_: (date, tz) => util.datetime(date, util.date_formats.post_date, tz), - mindflowDateToId: (date, tz) => util.datetime(date, util.date_formats.id_date, tz), + date_id: (date, tz) => util.datetime(date, util.date_formats.id_date, tz), rssLink: util.rssLink }, app: app });