BackendAPI: Return Note created within createNoteAndRefresh (#647)

This commit is contained in:
Arne 2019-10-01 21:40:57 +02:00 committed by zadam
parent 8ec01c73cd
commit 334a38c493

View file

@ -209,9 +209,11 @@ function BackendScriptApi(currentNote, apiParams) {
* @returns {Promise<{note: Note, branch: Branch}>} object contains newly created entities note and branch
*/
this.createNoteAndRefresh = async function(parentNoteId, title, content, extraOptions) {
await noteService.createNote(parentNoteId, title, content, extraOptions);
const note = await noteService.createNote(parentNoteId, title, content, extraOptions);
ws.refreshTree();
return note;
};
/**