@iankibetsh/shframework 5.2.4 → 5.2.5
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/dist/library.js +11 -4
- package/dist/library.mjs +11 -4
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -437,11 +437,18 @@ const axios = Axios__default["default"].create({
|
|
|
437
437
|
window.shAxionInstance = axios;
|
|
438
438
|
function doGet (endPoint, data,extraConfig) {
|
|
439
439
|
updateSession();
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
let accessToken = shStorage.getItem('access_token');
|
|
441
|
+
if(accessToken === 'undefined' || accessToken === 'null'){
|
|
442
|
+
accessToken = null;
|
|
443
|
+
}
|
|
444
|
+
let config = {};
|
|
445
|
+
if(accessToken){
|
|
446
|
+
config = {
|
|
447
|
+
headers: {
|
|
448
|
+
Authorization: 'Bearer ' + accessToken
|
|
449
|
+
}
|
|
450
|
+
};
|
|
443
451
|
}
|
|
444
|
-
};
|
|
445
452
|
if (extraConfig) {
|
|
446
453
|
Object.assign(config, extraConfig);
|
|
447
454
|
}
|
package/dist/library.mjs
CHANGED
|
@@ -425,11 +425,18 @@ const axios = Axios.create({
|
|
|
425
425
|
window.shAxionInstance = axios;
|
|
426
426
|
function doGet (endPoint, data,extraConfig) {
|
|
427
427
|
updateSession();
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
428
|
+
let accessToken = shStorage.getItem('access_token');
|
|
429
|
+
if(accessToken === 'undefined' || accessToken === 'null'){
|
|
430
|
+
accessToken = null;
|
|
431
|
+
}
|
|
432
|
+
let config = {};
|
|
433
|
+
if(accessToken){
|
|
434
|
+
config = {
|
|
435
|
+
headers: {
|
|
436
|
+
Authorization: 'Bearer ' + accessToken
|
|
437
|
+
}
|
|
438
|
+
};
|
|
431
439
|
}
|
|
432
|
-
};
|
|
433
440
|
if (extraConfig) {
|
|
434
441
|
Object.assign(config, extraConfig);
|
|
435
442
|
}
|