summaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/web/note/slide.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/web/note/slide.js b/lib/web/note/slide.js
index e6ac9dd0..d2d2ccfc 100644
--- a/lib/web/note/slide.js
+++ b/lib/web/note/slide.js
@@ -32,7 +32,10 @@ exports.showPublishSlide = function (req, res, next) {
return errors.errorNotFound(res)
}
noteUtil.getPublishData(req, res, note, (data) => {
- return renderPublishSlide(data, res)
+ res.set({
+ 'Cache-Control': 'private' // only cache by client
+ })
+ return res.render('slide.ejs', data)
})
}).catch(function (err) {
logger.error(err)
@@ -40,10 +43,3 @@ exports.showPublishSlide = function (req, res, next) {
})
}, include)
}
-
-function renderPublishSlide (data, res) {
- res.set({
- 'Cache-Control': 'private' // only cache by client
- })
- res.render('slide.ejs', data)
-}