yet another refactoring of working with note's payload/content

This commit is contained in:
zadam
2019-03-26 22:24:04 +01:00
parent 4bdcf32475
commit 29c60581a6
31 changed files with 126 additions and 239 deletions

View File

@@ -78,7 +78,6 @@ async function createInitialDatabase(username, password) {
await sql.executeScript(schema);
const Note = require("../entities/note");
const NoteContent = require("../entities/note_content");
const Branch = require("../entities/branch");
const rootNote = await new Note({
@@ -88,10 +87,7 @@ async function createInitialDatabase(username, password) {
mime: 'text/html'
}).save();
const rootNoteContent = await new NoteContent({
noteId: rootNote.noteId,
content: ''
}).save();
await rootNote.setContent('');
await new Branch({
branchId: 'root',