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

@@ -649,11 +649,9 @@ async function createNote(node, parentNoteId, target, extraOptions = {}) {
const newNoteName = extraOptions.title || "new note";
const {note, branch} = await server.post('notes/' + parentNoteId + '/children', {
const {note, branch} = await server.post(`notes/${parentNoteId}/children?target=${target}&targetBranchId=${node.data.branchId}`, {
title: newNoteName,
content: extraOptions.content,
target: target,
target_branchId: node.data.branchId,
isProtected: extraOptions.isProtected,
type: extraOptions.type
});