From 5b789025f314e4bb154df266b2e6dd148747efa2 Mon Sep 17 00:00:00 2001
From: Alex Garcia
Date: Sat, 27 Oct 2018 16:55:14 -0700
Subject: Add download action to published notes

Signed-off-by: Alex Garcia <alexsebastian.garcia@gmail.com>
---
 lib/response.js | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'lib')

diff --git a/lib/response.js b/lib/response.js
index 4f572e47..3e38fe68 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
-- 
cgit v1.2.3


From fcf08f89c3fe5f7708db7748e209a13b30c1e121 Mon Sep 17 00:00:00 2001
From: Alex Garcia
Date: Sat, 27 Oct 2018 17:54:01 -0700
Subject: forgot break statement

Signed-off-by: Alex Garcia <alexsebastian.garcia@gmail.com>
---
 lib/response.js | 1 +
 1 file changed, 1 insertion(+)

(limited to 'lib')

diff --git a/lib/response.js b/lib/response.js
index 3e38fe68..a400d021 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
-- 
cgit v1.2.3