@iankibetsh/shframework 5.2.2 → 5.2.4
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 +8 -5
- package/dist/library.mjs +8 -5
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -453,15 +453,18 @@ function doGet (endPoint, data,extraConfig) {
|
|
|
453
453
|
}
|
|
454
454
|
function doPost (endPoint, data, extraConfig) {
|
|
455
455
|
updateSession();
|
|
456
|
-
|
|
456
|
+
let accessToken = shStorage.getItem('access_token');
|
|
457
|
+
if(accessToken === 'undefined' || accessToken === 'null'){
|
|
458
|
+
accessToken = null;
|
|
459
|
+
}
|
|
460
|
+
let config = {};
|
|
457
461
|
if(accessToken){
|
|
458
|
-
|
|
462
|
+
config = {
|
|
459
463
|
headers: {
|
|
460
|
-
Authorization: 'Bearer ' +
|
|
464
|
+
Authorization: 'Bearer ' + accessToken
|
|
461
465
|
}
|
|
462
|
-
}
|
|
466
|
+
};
|
|
463
467
|
}
|
|
464
|
-
|
|
465
468
|
if (extraConfig) {
|
|
466
469
|
Object.assign(config, extraConfig);
|
|
467
470
|
}
|
package/dist/library.mjs
CHANGED
|
@@ -441,15 +441,18 @@ function doGet (endPoint, data,extraConfig) {
|
|
|
441
441
|
}
|
|
442
442
|
function doPost (endPoint, data, extraConfig) {
|
|
443
443
|
updateSession();
|
|
444
|
-
|
|
444
|
+
let accessToken = shStorage.getItem('access_token');
|
|
445
|
+
if(accessToken === 'undefined' || accessToken === 'null'){
|
|
446
|
+
accessToken = null;
|
|
447
|
+
}
|
|
448
|
+
let config = {};
|
|
445
449
|
if(accessToken){
|
|
446
|
-
|
|
450
|
+
config = {
|
|
447
451
|
headers: {
|
|
448
|
-
Authorization: 'Bearer ' +
|
|
452
|
+
Authorization: 'Bearer ' + accessToken
|
|
449
453
|
}
|
|
450
|
-
}
|
|
454
|
+
};
|
|
451
455
|
}
|
|
452
|
-
|
|
453
456
|
if (extraConfig) {
|
|
454
457
|
Object.assign(config, extraConfig);
|
|
455
458
|
}
|