@iankibetsh/shframework 4.2.3 → 4.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 +20 -11
- package/dist/library.mjs +20 -11
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -404,26 +404,35 @@ 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
|
+
let 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,
|
|
420
|
+
...config
|
|
416
421
|
})
|
|
417
422
|
}
|
|
418
|
-
function doPost (endPoint, data) {
|
|
423
|
+
function doPost (endPoint, data, extraConfig) {
|
|
419
424
|
updateSession();
|
|
425
|
+
const config = {
|
|
426
|
+
headers: {
|
|
427
|
+
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
if (extraConfig) {
|
|
431
|
+
Object.assign(config, extraConfig);
|
|
432
|
+
}
|
|
420
433
|
return axios.post(endPoint,
|
|
421
434
|
data,
|
|
422
|
-
|
|
423
|
-
headers: {
|
|
424
|
-
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
425
|
-
}
|
|
426
|
-
}
|
|
435
|
+
config
|
|
427
436
|
)
|
|
428
437
|
}
|
|
429
438
|
function graphQlQuery(query) {
|
package/dist/library.mjs
CHANGED
|
@@ -392,26 +392,35 @@ 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
|
+
let 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,
|
|
408
|
+
...config
|
|
404
409
|
})
|
|
405
410
|
}
|
|
406
|
-
function doPost (endPoint, data) {
|
|
411
|
+
function doPost (endPoint, data, extraConfig) {
|
|
407
412
|
updateSession();
|
|
413
|
+
const config = {
|
|
414
|
+
headers: {
|
|
415
|
+
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
if (extraConfig) {
|
|
419
|
+
Object.assign(config, extraConfig);
|
|
420
|
+
}
|
|
408
421
|
return axios.post(endPoint,
|
|
409
422
|
data,
|
|
410
|
-
|
|
411
|
-
headers: {
|
|
412
|
-
Authorization: 'Bearer ' + ShStorage.getItem('access_token')
|
|
413
|
-
}
|
|
414
|
-
}
|
|
423
|
+
config
|
|
415
424
|
)
|
|
416
425
|
}
|
|
417
426
|
function graphQlQuery(query) {
|