mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
if the sender request contains a label and/or a labelValue, apply it (#1310)
This commit is contained in:
parent
b2b3c80192
commit
a7c13ceacc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user