From 8a3d07b2286bfc3db04192f788425c3a56e92e80 Mon Sep 17 00:00:00 2001 From: Matjaz Date: Sat, 8 Jan 2022 22:09:20 +0100 Subject: [PATCH] Fix error with articles page. --- routes/articles.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/routes/articles.js b/routes/articles.js index 897bc1a..5f10851 100644 --- a/routes/articles.js +++ b/routes/articles.js @@ -8,8 +8,6 @@ function toTitleCase(str) { /* GET home page. */ function articles(request, response) { - var articlesPage = `20 text/gemini\r\n\r\n# Articles by Uplink:SI\r\nList of Articles:\r\n${contents}\r\n`; - try { var articleList = fs.readdirSync('./articles'); articleList.reverse(); @@ -19,6 +17,7 @@ function articles(request, response) { title = toTitleCase(title); contents += `=> /articles/${item} ${title}\r\n`; }); + var articlesPage = `20 text/gemini\r\n\r\n# Articles by Uplink:SI\r\nList of Articles:\r\n${contents}\r\n`; response.send(articlesPage); } catch (error) { response.error(51);