Fix error with articles page.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user