mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
Inline publish and slide
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
25a540ebbc
commit
ca9e6e49c9
1 changed files with 2 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue