From bb80bc2292d2841776e8bfd6285f96194d990284 Mon Sep 17 00:00:00 2001 From: Claudius Date: Mon, 10 Sep 2018 22:35:38 +0200 Subject: removing superfluous config parameters for template files Signed-off-by: Claudius --- lib/response.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/response.js') diff --git a/lib/response.js b/lib/response.js index 295f91d6..88623043 100644 --- a/lib/response.js +++ b/lib/response.js @@ -51,7 +51,7 @@ var response = { } function responseError (res, code, detail, msg) { - res.status(code).render(config.errorPath, { + res.status(code).render('error.ejs', { url: config.serverURL, title: code + ' ' + detail + ' ' + msg, code: code, @@ -101,11 +101,11 @@ function showIndex (req, res, next) { }).then(function (user) { if (user) { data.deleteToken = user.deleteToken - res.render(config.indexPath, data) + res.render('index.ejs', data) } }) } else { - res.render(config.indexPath, data) + res.render('index.ejs', data) } } @@ -119,7 +119,7 @@ function responseCodiMD (res, note) { 'Cache-Control': 'private', // only cache by client 'X-Robots-Tag': 'noindex, nofollow' // prevent crawling }) - res.render(config.codimdPath, { + res.render('codimd.ejs', { url: config.serverURL, title: title, useCDN: config.useCDN, @@ -275,7 +275,7 @@ function renderPublish (data, res) { res.set({ 'Cache-Control': 'private' // only cache by client }) - res.render(config.prettyPath, data) + res.render('pretty.ejs', data) } function actionPublish (req, res, note) { @@ -657,7 +657,7 @@ function renderPublishSlide (data, res) { res.set({ 'Cache-Control': 'private' // only cache by client }) - res.render(config.slidePath, data) + res.render('slide.ejs', data) } module.exports = response -- cgit v1.2.3