From 5b789025f314e4bb154df266b2e6dd148747efa2 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Sat, 27 Oct 2018 16:55:14 -0700 Subject: [PATCH 1/2] Add download action to published notes Signed-off-by: Alex Garcia --- lib/response.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/response.js b/lib/response.js index 4f572e4..3e38fe6 100644 --- a/lib/response.js +++ b/lib/response.js @@ -468,6 +468,8 @@ function publishNoteActions (req, res, next) { findNote(req, res, function (note) { var action = req.params.action switch (action) { + case 'download': + actionDownload(req, res, note) case 'edit': res.redirect(config.serverURL + '/' + (note.alias ? note.alias : models.Note.encodeNoteId(note.id))) break From fcf08f89c3fe5f7708db7748e209a13b30c1e121 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Sat, 27 Oct 2018 17:54:01 -0700 Subject: [PATCH 2/2] forgot break statement Signed-off-by: Alex Garcia --- lib/response.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/response.js b/lib/response.js index 3e38fe6..a400d02 100644 --- a/lib/response.js +++ b/lib/response.js @@ -470,6 +470,7 @@ function publishNoteActions (req, res, next) { switch (action) { case 'download': actionDownload(req, res, note) + break case 'edit': res.redirect(config.serverURL + '/' + (note.alias ? note.alias : models.Note.encodeNoteId(note.id))) break