summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Mehren2019-10-27 15:44:23 +0100
committerDavid Mehren2019-10-27 15:50:24 +0100
commitb5ccceff59002034fbb089935076f40b8aa16e58 (patch)
tree29ecaa58ca46dac9df1c7ca20fc27ea1b12913ba /lib
parent3c39d07723e20cbd7facb68253ef1aead8da753c (diff)
Inline renderPublishSlide
Signed-off-by: David Mehren <dmehren1@gmail.com>
Diffstat (limited to 'lib')
-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)
-}