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

@@ -1,5 +1,4 @@
const Note = require('../entities/note');
const NoteContent = require('../entities/note_content');
const NoteRevision = require('../entities/note_revision');
const Link = require('../entities/link');
const Branch = require('../entities/branch');
@@ -13,7 +12,6 @@ const ENTITY_NAME_TO_ENTITY = {
"attributes": Attribute,
"branches": Branch,
"notes": Note,
"note_contents": NoteContent,
"note_revisions": NoteRevision,
"recent_notes": RecentNote,
"options": Option,
@@ -50,9 +48,6 @@ function createEntityFromRow(row) {
else if (row.branchId) {
entity = new Branch(row);
}
else if (row.noteContentId) {
entity = new NoteContent(row);
}
else if (row.noteId) {
entity = new Note(row);
}