aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-09 21:31:03 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-13 23:11:56 -0500
commitf07207c9bfd940cc77345d38cbfd780fda1e065c (patch)
tree91c42d376d25869186ee0e9215a431f172a73bc0 /ext/bg/js/backend.js
parent5a743505528cc2cc96ab6bf41a7460c75f6c084c (diff)
Move apiTemplateRender implementation into Backend
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 4db88365..38dbd0f1 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -389,8 +389,12 @@ class Backend {
return this.anki.guiBrowse(`nid:${noteId}`);
}
- _onApiTemplateRender({template, data, dynamic}) {
- return apiTemplateRender(template, data, dynamic);
+ async _onApiTemplateRender({template, data, dynamic}) {
+ return (
+ dynamic ?
+ handlebarsRenderDynamic(template, data) :
+ handlebarsRenderStatic(template, data)
+ );
}
_onApiCommandExec({command, params}) {