repository is now stateless

This commit is contained in:
azivner
2018-03-31 09:07:58 -04:00
parent 05676f3459
commit 088fb00ca9
9 changed files with 87 additions and 98 deletions

View File

@@ -1,11 +1,9 @@
const script = require('./script');
const Repository = require('./repository');
const repository = require('./repository');
const cls = require('./cls');
const repo = new Repository();
async function runNotesWithLabel(runAttrValue) {
const notes = await repo.getEntities(`
const notes = await repository.getEntities(`
SELECT notes.*
FROM notes
JOIN labels ON labels.noteId = notes.noteId
@@ -17,7 +15,7 @@ async function runNotesWithLabel(runAttrValue) {
AND notes.isDeleted = 0`, [runAttrValue]);
for (const note of notes) {
script.executeNote(null, note);
script.executeNote(note);
}
}