Move apiNoteView implementation into Backend

This commit is contained in:
toasted-nutbread 2019-12-09 21:29:48 -05:00
parent 233ed4d0fb
commit 5a74350552
2 changed files with 4 additions and 4 deletions

View File

@ -57,8 +57,8 @@ function apiDefinitionsAddable(definitions, modes, optionsContext) {
return utilBackend()._onApiDefinitionsAddable({definitions, modes, optionsContext});
}
async function apiNoteView(noteId) {
return utilBackend().anki.guiBrowse(`nid:${noteId}`);
function apiNoteView(noteId) {
return utilBackend()._onApiNoteView({noteId});
}
async function apiTemplateRender(template, data, dynamic) {

View File

@ -385,8 +385,8 @@ class Backend {
return states;
}
_onApiNoteView({noteId}) {
return apiNoteView(noteId);
async _onApiNoteView({noteId}) {
return this.anki.guiBrowse(`nid:${noteId}`);
}
_onApiTemplateRender({template, data, dynamic}) {