removing superfluous config parameters for template files
Signed-off-by: Claudius <opensource@amenthes.de>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user