diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-08-14 21:43:09 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-08-14 21:43:09 -0700 |
commit | bdf231082f4b4ca7c4c90d8b0cd40b6c4201723d (patch) | |
tree | b378fa497e850c85145b241541edcace45324ca1 /ext/bg/js/backend.js | |
parent | 82863cd86156d48b9f18dc10a560bedb82641862 (diff) |
lots of fixes to backend
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r-- | ext/bg/js/backend.js | 20 |
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); } }; |