sirius-common-utils 1.0.20 → 1.0.21
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.
|
@@ -148,12 +148,13 @@ const AppUtils = {
|
|
|
148
148
|
setSessionStorageObjItem,
|
|
149
149
|
getSessionStorageObjItem
|
|
150
150
|
};
|
|
151
|
-
async function init$2(deviceType, pCurrUserInfoCache, pCustomizedUserUtils) {
|
|
151
|
+
async function init$2(deviceType, pCurrUserInfoCache, pCustomizedUserUtils, pUriGetCurrUserInfo) {
|
|
152
152
|
if (pCurrUserInfoCache) {
|
|
153
153
|
currUserInfoCache = pCurrUserInfoCache;
|
|
154
154
|
AppUtils.setLocalStorageObjItem("CURRENT_USER", currUserInfoCache);
|
|
155
155
|
}
|
|
156
156
|
customizedUserUtils = pCustomizedUserUtils;
|
|
157
|
+
uriGetCurrUserInfo = pUriGetCurrUserInfo || `/api/user/getCurrUserInfo`;
|
|
157
158
|
await getCurrUserModel();
|
|
158
159
|
setDeviceType(deviceType);
|
|
159
160
|
}
|
|
@@ -198,11 +199,11 @@ function getCurrUserId() {
|
|
|
198
199
|
var _a;
|
|
199
200
|
return (_a = getCurrUserInfoCache()) == null ? void 0 : _a.id;
|
|
200
201
|
}
|
|
202
|
+
let uriGetCurrUserInfo = null;
|
|
201
203
|
let appUserModel = null;
|
|
202
204
|
async function getCurrUserModel() {
|
|
203
205
|
if (appUserModel == null) {
|
|
204
|
-
|
|
205
|
-
appUserModel = await AxiosUtils.getJsonData(url);
|
|
206
|
+
appUserModel = await AxiosUtils.getJsonData(uriGetCurrUserInfo);
|
|
206
207
|
}
|
|
207
208
|
return appUserModel;
|
|
208
209
|
}
|
|
@@ -149,12 +149,13 @@
|
|
|
149
149
|
setSessionStorageObjItem,
|
|
150
150
|
getSessionStorageObjItem
|
|
151
151
|
};
|
|
152
|
-
async function init$2(deviceType, pCurrUserInfoCache, pCustomizedUserUtils) {
|
|
152
|
+
async function init$2(deviceType, pCurrUserInfoCache, pCustomizedUserUtils, pUriGetCurrUserInfo) {
|
|
153
153
|
if (pCurrUserInfoCache) {
|
|
154
154
|
currUserInfoCache = pCurrUserInfoCache;
|
|
155
155
|
AppUtils.setLocalStorageObjItem("CURRENT_USER", currUserInfoCache);
|
|
156
156
|
}
|
|
157
157
|
customizedUserUtils = pCustomizedUserUtils;
|
|
158
|
+
uriGetCurrUserInfo = pUriGetCurrUserInfo || `/api/user/getCurrUserInfo`;
|
|
158
159
|
await getCurrUserModel();
|
|
159
160
|
setDeviceType(deviceType);
|
|
160
161
|
}
|
|
@@ -199,11 +200,11 @@
|
|
|
199
200
|
var _a;
|
|
200
201
|
return (_a = getCurrUserInfoCache()) == null ? void 0 : _a.id;
|
|
201
202
|
}
|
|
203
|
+
let uriGetCurrUserInfo = null;
|
|
202
204
|
let appUserModel = null;
|
|
203
205
|
async function getCurrUserModel() {
|
|
204
206
|
if (appUserModel == null) {
|
|
205
|
-
|
|
206
|
-
appUserModel = await AxiosUtils.getJsonData(url);
|
|
207
|
+
appUserModel = await AxiosUtils.getJsonData(uriGetCurrUserInfo);
|
|
207
208
|
}
|
|
208
209
|
return appUserModel;
|
|
209
210
|
}
|