diff --git a/lib/web/note/controller.js b/lib/web/note/controller.js index 1395825f4..3641f6b1f 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)