removing superfluous config parameters for template files

Signed-off-by: Claudius <opensource@amenthes.de>
This commit is contained in:
Claudius 2018-09-10 22:35:38 +02:00 committed by WilliButz
parent 825ee4e66e
commit bb80bc2292
No known key found for this signature in database
GPG key ID: 92582A10F1179CB2
5 changed files with 11 additions and 22 deletions

View file

@ -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