summaryrefslogtreecommitdiff
path: root/lib/response.js
diff options
context:
space:
mode:
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