Another small refactoring. Why have I done that in the first place?...

This commit is contained in:
Alexander Andreev 2021-09-08 20:54:38 +04:00
parent bd99c3e11e
commit 1f0c62176a
Signed by: Arav
GPG Key ID: 610DF2574456329F
2 changed files with 1 additions and 2 deletions

View File

@ -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 => {

View File

@ -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.