mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
frontend scripts now have startNote, currentNote and targetNote as NoteShort entities which e.g. provides easy access to relations/labels
This commit is contained in:
@@ -30,7 +30,7 @@ async function getStartupBundles() {
|
||||
const bundles = [];
|
||||
|
||||
for (const note of notes) {
|
||||
const bundle = await scriptService.getScriptBundle(note);
|
||||
const bundle = await scriptService.getScriptBundleForFrontend(note);
|
||||
|
||||
if (bundle) {
|
||||
bundles.push(bundle);
|
||||
@@ -54,7 +54,7 @@ async function getRelationBundles(req) {
|
||||
|
||||
for (const noteId of uniqueNoteIds) {
|
||||
const note = await repository.getNote(noteId);
|
||||
const bundle = await scriptService.getScriptBundle(note);
|
||||
const bundle = await scriptService.getScriptBundleForFrontend(note);
|
||||
|
||||
if (bundle) {
|
||||
bundles.push(bundle);
|
||||
@@ -67,7 +67,7 @@ async function getRelationBundles(req) {
|
||||
async function getBundle(req) {
|
||||
const note = await repository.getNote(req.params.noteId);
|
||||
|
||||
return await scriptService.getScriptBundle(note);
|
||||
return await scriptService.getScriptBundleForFrontend(note);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user