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,6 +1,6 @@
const sql = require('./sql');
const ScriptContext = require('./script_context');
const Repository = require('./repository');
const repository = require('./repository');
async function executeNote(note) {
if (!note.isJavaScript()) {
@@ -36,7 +36,6 @@ async function executeBundle(bundle, startNote) {
* bundle's startNote.
*/
async function executeScript(script, params, startNoteId, currentNoteId) {
const repository = new Repository();
const startNote = await repository.getNote(startNoteId);
const currentNote = await repository.getNote(currentNoteId);