summaryrefslogtreecommitdiff
path: root/lib/response.js
diff options
context:
space:
mode:
authorClaudius2018-09-10 22:35:38 +0200
committerWilliButz2018-09-26 21:01:15 +0200
commitbb80bc2292d2841776e8bfd6285f96194d990284 (patch)
tree9ea69de534cd1d977e6d8a886a8f4e576132996f /lib/response.js
parent825ee4e66e79271c39631f2b9eb059caa8f17bfc (diff)
removing superfluous config parameters for template files
Signed-off-by: Claudius <opensource@amenthes.de>
Diffstat (limited to '')
-rw-r--r--lib/response.js12
1 files changed, 6 insertions, 6 deletions
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