mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-28 14:04:43 -04:00
removing superfluous config parameters for template files
Signed-off-by: Claudius <opensource@amenthes.de>
This commit is contained in:
parent
825ee4e66e
commit
bb80bc2292
5 changed files with 11 additions and 22 deletions
lib
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue