Another small refactoring. Why have I done that in the first place?...
This commit is contained in:
parent
bd99c3e11e
commit
1f0c62176a
@ -106,7 +106,6 @@ function setRoutes() {
|
|||||||
tz: util.getClientTimezone(ctx),
|
tz: util.getClientTimezone(ctx),
|
||||||
owner: config.guestbook.owner,
|
owner: config.guestbook.owner,
|
||||||
posts: posts,
|
posts: posts,
|
||||||
error: posts === null,
|
|
||||||
pages_count: Math.ceil(await guestbook.getPostsCount() / page_size) });
|
pages_count: Math.ceil(await guestbook.getPostsCount() / page_size) });
|
||||||
})
|
})
|
||||||
.post('/guestbook', bodyParser, async ctx => {
|
.post('/guestbook', bodyParser, async ctx => {
|
||||||
|
@ -41,7 +41,7 @@ block content
|
|||||||
each line in post.feedback.split("\n")
|
each line in post.feedback.split("\n")
|
||||||
p= line
|
p= line
|
||||||
else
|
else
|
||||||
if (error)
|
if (posts === null)
|
||||||
p.center Cannot establish database connection.
|
p.center Cannot establish database connection.
|
||||||
else
|
else
|
||||||
p.center No posts.
|
p.center No posts.
|
||||||
|
Loading…
Reference in New Issue
Block a user