From ca9e6e49c9c80ecdd1f79635062f1cef4c931ffb Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 27 Oct 2019 15:27:48 +0100 Subject: Inline publish and slide Signed-off-by: David Mehren --- lib/web/note/controller.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/web/note/controller.js b/lib/web/note/controller.js index 1395825f..3641f6b1 100644 --- a/lib/web/note/controller.js +++ b/lib/web/note/controller.js @@ -86,10 +86,10 @@ exports.doAction = function (req, res, next) { switch (action) { case 'publish': case 'pretty': // pretty deprecated - publish(req, res, note) + res.redirect(config.serverURL + '/s/' + (note.alias || note.shortid)) break case 'slide': - slide(req, res, note) + res.redirect(config.serverURL + '/p/' + (note.alias || note.shortid)) break case 'download': exports.downloadMarkdown(req, res, note) @@ -117,14 +117,6 @@ exports.doAction = function (req, res, next) { }) } -function publish (req, res, note) { - res.redirect(config.serverURL + '/s/' + (note.alias || note.shortid)) -} - -function slide (req, res, note) { - res.redirect(config.serverURL + '/p/' + (note.alias || note.shortid)) -} - exports.downloadMarkdown = function (req, res, note) { const body = note.content let filename = models.Note.decodeTitle(note.title) -- cgit v1.2.3