aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index e8c9452c..97e5602a 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Alex Yatskov <alex@foosoft.net>
+ * Copyright (C) 2016-2017 Alex Yatskov <alex@foosoft.net>
* Author: Alex Yatskov <alex@foosoft.net>
*
* This program is free software: you can redistribute it and/or modify
@@ -77,7 +77,11 @@ class Backend {
const handlers = {
optionsGet: ({callback}) => {
- forward(optionsLoad(), callback);
+ forward(apiOptionsGet(), callback);
+ },
+
+ optionsSet: ({options, callback}) => {
+ forward(apiOptionsSet(options), callback);
},
kanjiFind: ({text, callback}) => {
@@ -88,10 +92,6 @@ class Backend {
forward(apiTermsFind(text), callback);
},
- templateRender: ({template, data, callback}) => {
- forward(apiTemplateRender(template, data), callback);
- },
-
definitionAdd: ({definition, mode, callback}) => {
forward(apiDefinitionAdd(definition, mode), callback);
},
@@ -102,6 +102,14 @@ class Backend {
noteView: ({noteId}) => {
forward(apiNoteView(noteId), callback);
+ },
+
+ templateRender: ({template, data, callback}) => {
+ forward(apiTemplateRender(template, data), callback);
+ },
+
+ commandExec: ({command, callback}) => {
+ forward(apiCommandExec(command), callback);
}
};