summaryrefslogtreecommitdiff
path: root/lib/web/note
diff options
context:
space:
mode:
authorDavid Mehren2019-10-27 15:27:48 +0100
committerDavid Mehren2019-10-27 15:27:48 +0100
commitca9e6e49c9c80ecdd1f79635062f1cef4c931ffb (patch)
tree70e25e1e6aab3e882ddd5ca5a1c3c8943def8d11 /lib/web/note
parent25a540ebbc3805bc3225b84e91d683ef8fa9e3ed (diff)
Inline publish and slide
Signed-off-by: David Mehren <dmehren1@gmail.com>
Diffstat (limited to 'lib/web/note')
-rw-r--r--lib/web/note/controller.js12
1 files changed, 2 insertions, 10 deletions
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)