summaryrefslogtreecommitdiffstats
path: root/js/service/Settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/service/Settings.js')
-rw-r--r--js/service/Settings.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/js/service/Settings.js b/js/service/Settings.js
index 1bc716b07..e8189fcd5 100644
--- a/js/service/Settings.js
+++ b/js/service/Settings.js
@@ -7,7 +7,9 @@
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @copyright Bernhard Posselt 2014
*/
-app.service('Settings', function () {
+
+ /*jshint unused:false*/
+app.service('Settings', function ($http, BASE_URL) {
'use strict';
this.settings = {};
@@ -24,6 +26,15 @@ app.service('Settings', function () {
this.set = (key, value) => {
this.settings[key] = value;
+
+ let data = {};
+ data[key] = value;
+
+ return $http({
+ url: `${BASE_URL}/settings`,
+ method: 'POST',
+ data: data
+ });
};
}); \ No newline at end of file