From a7c13ceacc3475db7784c6a4c5e5d3fb3b9c8ed0 Mon Sep 17 00:00:00 2001 From: Casey Doran Date: Fri, 16 Oct 2020 10:40:30 -0700 Subject: [PATCH] if the sender request contains a label and/or a labelValue, apply it (#1310) --- src/routes/api/sender.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/routes/api/sender.js b/src/routes/api/sender.js index dac2116d8..031c3fcf1 100644 --- a/src/routes/api/sender.js +++ b/src/routes/api/sender.js @@ -35,6 +35,14 @@ function saveNote(req) { mime: 'text/html' }); + if (req.body.label && req.body.label.trim()){ + let value; + if (req.body.labelValue && req.body.labelValue.trim()){ + value = req.body.labelValue; + } + note.setLabel(req.body.label, value); + } + return { noteId: note.noteId, branchId: branch.branchId