|
@@ -5,8 +5,8 @@
|
5
|
5
|
(function () {
|
6
|
6
|
'use strict';
|
7
|
7
|
angular.module('luticateAuth')
|
8
|
|
- .factory('luticateAuthSettingsUser', ['luticateAuthSettingsUserDataAccess',
|
9
|
|
- function(luticateAuthSettingsUserDataAccess) {
|
|
8
|
+ .factory('luticateAuthSettingsUser', ['luticateAuthSettingsUserDataAccess', '$q', 'luticateAuthCache',
|
|
9
|
+ function(luticateAuthSettingsUserDataAccess, $q, luticateAuthCache) {
|
10
|
10
|
|
11
|
11
|
var luticateAuthSettingsUser = {
|
12
|
12
|
getAll: luticateAuthSettingsUserDataAccess.getAll,
|
|
@@ -15,6 +15,18 @@
|
15
|
15
|
editMe: luticateAuthSettingsUserDataAccess.editMe
|
16
|
16
|
};
|
17
|
17
|
|
|
18
|
+ luticateAuthSettingsUser.editMe = function(data, promise)
|
|
19
|
+ {
|
|
20
|
+ var defer = $q.defer();
|
|
21
|
+ luticateAuthSettingsUserDataAccess.editMe(data, promise)
|
|
22
|
+ .then(function(result)
|
|
23
|
+ {
|
|
24
|
+ luticateAuthCache.setEffectiveSettingValue(data.setting_name, data.setting_value);
|
|
25
|
+ defer.resolve(result);
|
|
26
|
+ }, defer.reject);
|
|
27
|
+ return defer.promise;
|
|
28
|
+ };
|
|
29
|
+
|
18
|
30
|
return luticateAuthSettingsUser;
|
19
|
31
|
}]);
|
20
|
32
|
})();
|