summaryrefslogtreecommitdiff
path: root/lib/response.js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-10-05 22:21:01 +0200
committerGitHub2018-10-05 22:21:01 +0200
commit32af96aa376576d060e16a2c0ff7ed5719d24e91 (patch)
tree16fe3f008e22d79a0f55af4357850c3ad24f2345 /lib/response.js
parentf186f733736a1e73fece235ef4952de7b703ec6c (diff)
parent61e240192e3ab7e02cb59115e10343da03f18951 (diff)
Merge pull request #940 from WilliButz/fix-configurable-paths
enhance configurabiltiy of paths & make execution path-independent
Diffstat (limited to 'lib/response.js')
-rw-r--r--lib/response.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/response.js b/lib/response.js
index 4df036b7..d30f2a8d 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -54,7 +54,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,
@@ -104,11 +104,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)
}
}
@@ -122,7 +122,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,
@@ -283,7 +283,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) {
@@ -665,7 +665,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