@iankibetsh/shframework 4.2.3 → 4.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 +19 -11
- package/dist/library.mjs +19 -11
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -404,26 +404,34 @@ const axios = Axios__default["default"].create({
|
|
|
404
404
|
baseURL: apiUrl
|
|
405
405
|
});
|
|
406
406
|
window.shAxionInstance = axios;
|
|
407
|
-
function doGet (endPoint, data) {
|
|
407
|
+
function doGet (endPoint, data,extraConfig) {
|
|
408
408
|
updateSession();
|
|
409
|
-
|
|
410
|
-
params: data,
|
|
411
|
-
crossOrigin: true,
|
|
409
|
+
const config = {
|
|
412
410
|
headers: {
|
|
413
411
|
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
414
|
-
// 'X-CSRF-TOKEN': 'INVALID'
|
|
415
412
|
}
|
|
413
|
+
};
|
|
414
|
+
if (extraConfig) {
|
|
415
|
+
Object.assign(config, extraConfig);
|
|
416
|
+
}
|
|
417
|
+
return axios.get(endPoint, {
|
|
418
|
+
params: data,
|
|
419
|
+
crossOrigin: true
|
|
416
420
|
})
|
|
417
421
|
}
|
|
418
|
-
function doPost (endPoint, data) {
|
|
422
|
+
function doPost (endPoint, data, extraConfig) {
|
|
419
423
|
updateSession();
|
|
424
|
+
const config = {
|
|
425
|
+
headers: {
|
|
426
|
+
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
if (extraConfig) {
|
|
430
|
+
Object.assign(config, extraConfig);
|
|
431
|
+
}
|
|
420
432
|
return axios.post(endPoint,
|
|
421
433
|
data,
|
|
422
|
-
|
|
423
|
-
headers: {
|
|
424
|
-
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
425
|
-
}
|
|
426
|
-
}
|
|
434
|
+
config
|
|
427
435
|
)
|
|
428
436
|
}
|
|
429
437
|
function graphQlQuery(query) {
|
package/dist/library.mjs
CHANGED
|
@@ -392,26 +392,34 @@ const axios = Axios.create({
|
|
|
392
392
|
baseURL: apiUrl
|
|
393
393
|
});
|
|
394
394
|
window.shAxionInstance = axios;
|
|
395
|
-
function doGet (endPoint, data) {
|
|
395
|
+
function doGet (endPoint, data,extraConfig) {
|
|
396
396
|
updateSession();
|
|
397
|
-
|
|
398
|
-
params: data,
|
|
399
|
-
crossOrigin: true,
|
|
397
|
+
const config = {
|
|
400
398
|
headers: {
|
|
401
399
|
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
402
|
-
// 'X-CSRF-TOKEN': 'INVALID'
|
|
403
400
|
}
|
|
401
|
+
};
|
|
402
|
+
if (extraConfig) {
|
|
403
|
+
Object.assign(config, extraConfig);
|
|
404
|
+
}
|
|
405
|
+
return axios.get(endPoint, {
|
|
406
|
+
params: data,
|
|
407
|
+
crossOrigin: true
|
|
404
408
|
})
|
|
405
409
|
}
|
|
406
|
-
function doPost (endPoint, data) {
|
|
410
|
+
function doPost (endPoint, data, extraConfig) {
|
|
407
411
|
updateSession();
|
|
412
|
+
const config = {
|
|
413
|
+
headers: {
|
|
414
|
+
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
if (extraConfig) {
|
|
418
|
+
Object.assign(config, extraConfig);
|
|
419
|
+
}
|
|
408
420
|
return axios.post(endPoint,
|
|
409
421
|
data,
|
|
410
|
-
|
|
411
|
-
headers: {
|
|
412
|
-
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
413
|
-
}
|
|
414
|
-
}
|
|
422
|
+
config
|
|
415
423
|
)
|
|
416
424
|
}
|
|
417
425
|
function graphQlQuery(query) {
|