smaller refactorings continued

This commit is contained in:
azivner
2018-04-01 12:45:35 -04:00
parent 8ba830c04b
commit 15d951b04e
6 changed files with 43 additions and 35 deletions

View File

@@ -40,9 +40,12 @@ function ScriptApi(startNote, currentNote) {
this.getInstanceName = () => config.General ? config.General.instanceName : null;
this.getNoteById = async function(noteId) {
return await repository.getNote(noteId);
};
this.getNote = repository.getNote;
this.getBranch = repository.getBranch;
this.getLabel = repository.getLabel;
this.getImage = repository.getImage;
this.getEntity = repository.getEntity;
this.getEntities = repository.getEntities;
this.getNotesWithLabel = async function (labelName, labelValue) {
return await labels.getNotesWithLabel(labelName, labelValue);
@@ -60,8 +63,6 @@ function ScriptApi(startNote, currentNote) {
this.createLabel = labels.createLabel;
this.updateEntity = repository.updateEntity;
this.log = message => log.info(`Script ${currentNote.noteId}: ${message}`);
this.getRootCalendarNoteId = date_notes.getRootCalendarNoteId;