gd-sprest 9.5.3 → 9.5.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/build/lib/contextInfo.js +7 -4
- package/build/rest.js +1 -1
- package/build/utils/helper.js +1 -1
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +1 -1
package/build/lib/contextInfo.js
CHANGED
|
@@ -837,8 +837,11 @@ var _ContextInfo = /** @class */ (function () {
|
|
|
837
837
|
this._worker = (0, webWorker_1.WebWorker)(function () {
|
|
838
838
|
// Refresh the REST API token
|
|
839
839
|
refreshREST();
|
|
840
|
-
//
|
|
841
|
-
|
|
840
|
+
// Ensure this is SPO
|
|
841
|
+
if (_this.isSPO) {
|
|
842
|
+
// Refresh the Graph API token
|
|
843
|
+
refreshGraph();
|
|
844
|
+
}
|
|
842
845
|
}, 1000);
|
|
843
846
|
// Start the process
|
|
844
847
|
this._worker.start();
|
|
@@ -877,8 +880,8 @@ var _ContextInfo = /** @class */ (function () {
|
|
|
877
880
|
_ContextInfo._worker = null;
|
|
878
881
|
_ContextInfo._onRefresh = [];
|
|
879
882
|
// Value in minutes to refresh the token
|
|
880
|
-
// Default is
|
|
881
|
-
_ContextInfo._refreshToken =
|
|
883
|
+
// Default is 15 minutes prior to it expiring
|
|
884
|
+
_ContextInfo._refreshToken = 15;
|
|
882
885
|
return _ContextInfo;
|
|
883
886
|
}());
|
|
884
887
|
exports.ContextInfo = _ContextInfo;
|
package/build/rest.js
CHANGED
package/build/utils/helper.js
CHANGED
|
@@ -66,7 +66,7 @@ exports.Helper = {
|
|
|
66
66
|
// Copy the target information
|
|
67
67
|
targetInfo = Object.create(base.targetInfo);
|
|
68
68
|
// See if this is a graph request and an id exists for the parent
|
|
69
|
-
if (base["@odata.etag"] && base["id"]) {
|
|
69
|
+
if ((base["@odata.etag"] || base.parent["@odata.context"]) && base["id"]) {
|
|
70
70
|
// Append the id
|
|
71
71
|
targetInfo.endpoint += "/" + base["id"];
|
|
72
72
|
}
|