diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-23 00:44:27 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-23 00:44:27 +0200 |
commit | a0b6fad1ada52457c2c5022fcb7685c1fff16abb (patch) | |
tree | f3d89fcbb203dfa9b5ea2f92213567abf13bb813 /js/service | |
parent | 7bcdc3d062996918c8cb59bf827a3db3229b8544 (diff) |
add most of the settings except import
Diffstat (limited to 'js/service')
-rw-r--r-- | js/service/Publisher.js | 2 | ||||
-rw-r--r-- | js/service/Settings.js | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/js/service/Publisher.js b/js/service/Publisher.js index d4efa4a80..dd420f629 100644 --- a/js/service/Publisher.js +++ b/js/service/Publisher.js @@ -7,6 +7,8 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ + +/*jshint undef:false*/ app.service('Publisher', function () { 'use strict'; 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 |