refactoring of note creation APIs WIP

This commit is contained in:
zadam
2019-11-16 12:28:47 +01:00
parent 13c0411533
commit 60231de0ed
3 changed files with 28 additions and 5 deletions

View File

@@ -56,7 +56,9 @@ async function createNote(req) {
const params = Object.assign({}, req.body); // clone
params.parentNoteId = req.params.parentNoteId;
const { note, branch } = await noteService.createNewNote(params);
const { target, targetBranchId } = req.query;
const { note, branch } = await noteService.createNewNoteWithTarget(target, targetBranchId, params);
note.cssClass = (await note.getLabels("cssClass")).map(label => label.value).join(" ");