@autofleet/zehut 1.7.3-beta5 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/user/ApiUser.js +0 -4
- package/package.json +1 -1
package/lib/user/ApiUser.js
CHANGED
|
@@ -96,17 +96,14 @@ class ApiUser {
|
|
|
96
96
|
}
|
|
97
97
|
getUserAppPermissions(appId, clientSecret) {
|
|
98
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
console.log('getUserAppPermissions1', appId, this.id);
|
|
100
99
|
if (!this.id || !appId || !clientSecret) {
|
|
101
100
|
return;
|
|
102
101
|
}
|
|
103
102
|
const currentAppPermission = this.appPermission[appId];
|
|
104
|
-
console.log('getUserAppPermissions2', currentAppPermission);
|
|
105
103
|
if (currentAppPermission) {
|
|
106
104
|
return currentAppPermission;
|
|
107
105
|
}
|
|
108
106
|
const cachedResult = userCache.get(`${this.id}:${appId}`);
|
|
109
|
-
console.log('getUserAppPermissions3', cachedResult);
|
|
110
107
|
if (cachedResult) {
|
|
111
108
|
this.appPermission[appId] = cachedResult;
|
|
112
109
|
return cachedResult;
|
|
@@ -118,7 +115,6 @@ class ApiUser {
|
|
|
118
115
|
'x-autofleet-apps-secret': clientSecret,
|
|
119
116
|
},
|
|
120
117
|
});
|
|
121
|
-
console.log('getUserAppPermissions4', data);
|
|
122
118
|
userCache.set(this.id, data);
|
|
123
119
|
this.appPermission[appId] = data;
|
|
124
120
|
return this.appPermission[appId];
|