diff --git a/lib/web/note/slide.js b/lib/web/note/slide.js index e6ac9dd04..d2d2ccfc5 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) -}