refactoring of note creation APIs WIP

This commit is contained in:
zadam
2019-11-16 11:09:52 +01:00
parent de02e9e889
commit 13c0411533
13 changed files with 115 additions and 107 deletions

View File

@@ -14,10 +14,10 @@ const DAYS = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Satur
const MONTHS = ['January','February','March','April','May','June','July','August','September','October','November','December'];
async function createNote(parentNoteId, noteTitle, noteText) {
return (await noteService.createNewNote(parentNoteId, {
return (await noteService.createNewNote({
parentNoteId: parentNoteId,
title: noteTitle,
content: noteText,
target: 'into',
isProtected: false
})).note;
}
@@ -35,7 +35,8 @@ async function getRootCalendarNote() {
let rootNote = await attributeService.getNoteWithLabel(CALENDAR_ROOT_LABEL);
if (!rootNote) {
rootNote = (await noteService.createNewNote('root', {
rootNote = (await noteService.createNewNote({
parentNoteId: 'root',
title: 'Calendar',
target: 'into',
isProtected: false