smaller refactorings continued

This commit is contained in:
azivner
2018-04-01 12:03:21 -04:00
parent acc82f39c4
commit 8ba830c04b
8 changed files with 41 additions and 34 deletions

View File

@@ -4,6 +4,7 @@ const Image = require('../entities/image');
const NoteImage = require('../entities/note_image');
const Branch = require('../entities/branch');
const Label = require('../entities/label');
const RecentNote = require('../entities/recent_note');
const repository = require('../services/repository');
function createEntityFromRow(row) {
@@ -21,6 +22,9 @@ function createEntityFromRow(row) {
else if (row.imageId) {
entity = new Image(row);
}
else if (row.branchId && row.notePath) {
entity = new RecentNote(row);
}
else if (row.branchId) {
entity = new Branch(row);
}