diff options
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 |