smaller refactorings continued

This commit is contained in:
azivner
2018-04-01 17:38:24 -04:00
parent 15d951b04e
commit 96dab5d51e
14 changed files with 122 additions and 109 deletions

View File

@@ -5,6 +5,7 @@ const NoteImage = require('../entities/note_image');
const Branch = require('../entities/branch');
const Label = require('../entities/label');
const RecentNote = require('../entities/recent_note');
const ApiToken = require('../entities/api_token');
const repository = require('../services/repository');
function createEntityFromRow(row) {
@@ -25,6 +26,9 @@ function createEntityFromRow(row) {
else if (row.branchId && row.notePath) {
entity = new RecentNote(row);
}
else if (row.apiTokenId) {
entity = new ApiToken(row);
}
else if (row.branchId) {
entity = new Branch(row);
}