From b5ccceff59002034fbb089935076f40b8aa16e58 Mon Sep 17 00:00:00 2001
From: David Mehren
Date: Sun, 27 Oct 2019 15:44:23 +0100
Subject: Inline renderPublishSlide

Signed-off-by: David Mehren <dmehren1@gmail.com>
---
 lib/web/note/slide.js | 12 ++++--------
 1 file 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)
-}
-- 
cgit v1.2.3