Inline publish and slide

Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
David Mehren 2019-10-27 15:27:48 +01:00
parent 25a540ebbc
commit ca9e6e49c9
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB

View file

@ -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)