summaryrefslogtreecommitdiff
path: root/ui/app/lib/bitmask.js
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-03-26 14:40:29 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2017-04-03 15:39:02 +0200
commitf4539da172c60533c98cc703f228591d59ca517d (patch)
tree0ab60e67b1797889cb08a71e0afac6a642b7d1d4 /ui/app/lib/bitmask.js
parenta6037f0855f1041c74ee9114bff08cfa1585e7a2 (diff)
[feat] expose core.version and core.stop in the js API
- Resolves: #8802
Diffstat (limited to 'ui/app/lib/bitmask.js')
-rw-r--r--ui/app/lib/bitmask.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/ui/app/lib/bitmask.js b/ui/app/lib/bitmask.js
index 56ba03d6..b0ada5b9 100644
--- a/ui/app/lib/bitmask.js
+++ b/ui/app/lib/bitmask.js
@@ -113,6 +113,25 @@ var bitmask = function(){
return {
api_token: function() {return api_token},
+
+ core: {
+ /**
+ * Get bitmaskd version
+ *
+ * @return {Promise<json>} {'version_core': str}
+ */
+ version: function() {
+ return call(['core', 'version']);
+ }
+
+ /**
+ * Stop bitmaskd
+ */
+ stop: function() {
+ return call(['core', 'stop']);
+ }
+ }
+
bonafide: {
provider: {
create: function(domain) {