if the sender request contains a label and/or a labelValue, apply it (#1310)

This commit is contained in:
Casey Doran
2020-10-16 10:40:30 -07:00
committed by GitHub
parent b2b3c80192
commit a7c13ceacc

View File

@@ -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