mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
smaller refactorings continued
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user