mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
refactoring of note creation APIs WIP
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user