Rename getPostsX() to just getPost that returns all posts. mindflowDateToId renamed to date_id.
This commit is contained in:
parent
1a41b3f901
commit
9b4c0e76bf
@ -54,7 +54,7 @@ function setRoutes() {
|
|||||||
doctype: 'xml',
|
doctype: 'xml',
|
||||||
schemahost: `${ctx.header.schema}://${ctx.header.host}`,
|
schemahost: `${ctx.header.schema}://${ctx.header.host}`,
|
||||||
author: "me@arav.top (Alexander \"Arav\" Andreev)",
|
author: "me@arav.top (Alexander \"Arav\" Andreev)",
|
||||||
items: await mindflow.getPostsForRSS()
|
items: await mindflow.getPosts()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.get('/stuff', async ctx => {
|
.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.",
|
description: "Here I will post updates on my infrastructure, my very important opinions and thoughts.",
|
||||||
files_site: util.getServiceByHost(ctx.request.host, "files"),
|
files_site: util.getServiceByHost(ctx.request.host, "files"),
|
||||||
tz: util.getClientTimezone(ctx),
|
tz: util.getClientTimezone(ctx),
|
||||||
diary: await mindflow.getPosts("Diary"),
|
posts: await mindflow.getPosts()
|
||||||
updates: await mindflow.getPosts("Update")
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.get('/stuff/article/:article', async ctx => {
|
.get('/stuff/article/:article', async ctx => {
|
||||||
@ -141,7 +140,7 @@ const pug = new koaPug({
|
|||||||
viewPath: path.join(__dirname, "views"),
|
viewPath: path.join(__dirname, "views"),
|
||||||
locals: {
|
locals: {
|
||||||
date_: (date, tz) => util.datetime(date, util.date_formats.post_date, tz),
|
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 },
|
rssLink: util.rssLink },
|
||||||
app: app
|
app: app
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user