exposing tree cache methods to reload note's parents/children to frontend API

This commit is contained in:
zadam
2019-04-13 22:56:45 +02:00
parent dae674a7cd
commit 2b4413a1bd
3 changed files with 33 additions and 4 deletions

View File

@@ -151,6 +151,18 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
*/
this.getNotes = async (noteIds, silentNotFoundError = false) => await treeCache.getNotes(noteIds, silentNotFoundError);
/**
* @param {string} noteId
* @method
*/
this.reloadChildren = async noteId => await treeCache.reloadChildren(noteId);
/**
* @param {string} noteId
* @method
*/
this.reloadParents = async noteId => await treeCache.reloadParents(noteId);
/**
* Instance name identifies particular Trilium instance. It can be useful for scripts
* if some action needs to happen on only one specific instance.