Add download action to published notes

Signed-off-by: Alex Garcia <alexsebastian.garcia@gmail.com>
This commit is contained in:
Alex Garcia 2018-10-27 16:55:14 -07:00
parent 152dfc2323
commit 5b789025f3
1 changed files with 2 additions and 0 deletions

View File

@ -468,6 +468,8 @@ function publishNoteActions (req, res, next) {
findNote(req, res, function (note) { findNote(req, res, function (note) {
var action = req.params.action var action = req.params.action
switch (action) { switch (action) {
case 'download':
actionDownload(req, res, note)
case 'edit': case 'edit':
res.redirect(config.serverURL + '/' + (note.alias ? note.alias : models.Note.encodeNoteId(note.id))) res.redirect(config.serverURL + '/' + (note.alias ? note.alias : models.Note.encodeNoteId(note.id)))
break break