gd-sprest 7.6.2 → 7.6.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/build/mapper/def.js +4 -2
- package/build/rest.js +1 -1
- package/build/utils/helper.js +9 -2
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +1 -1
package/build/mapper/def.js
CHANGED
|
@@ -5115,7 +5115,8 @@ exports.Mapper = {
|
|
|
5115
5115
|
getFileByUrl: {
|
|
5116
5116
|
argNames: ["fileUrl"],
|
|
5117
5117
|
name: "getFileByUrl(@url)?@url='[[fileUrl]]'",
|
|
5118
|
-
requestType: utils_1.RequestType.GetReplace
|
|
5118
|
+
requestType: utils_1.RequestType.GetReplace,
|
|
5119
|
+
returnType: "SP.File"
|
|
5119
5120
|
},
|
|
5120
5121
|
getFolderByServerRelativeUrl: {
|
|
5121
5122
|
argNames: ["serverRelativeUrl"],
|
|
@@ -6308,7 +6309,8 @@ exports.Mapper = {
|
|
|
6308
6309
|
getFileByUrl: {
|
|
6309
6310
|
argNames: ["fileUrl"],
|
|
6310
6311
|
name: "getFileByUrl(@url)?@url='[[fileUrl]]'",
|
|
6311
|
-
requestType: utils_1.RequestType.GetReplace
|
|
6312
|
+
requestType: utils_1.RequestType.GetReplace,
|
|
6313
|
+
returnType: "SP.File"
|
|
6312
6314
|
},
|
|
6313
6315
|
getFileByWOPIFrameUrl: {
|
|
6314
6316
|
argNames: ["wopiFrameUrl"],
|
package/build/rest.js
CHANGED
package/build/utils/helper.js
CHANGED
|
@@ -92,8 +92,15 @@ exports.Helper = {
|
|
|
92
92
|
// Add a "/" separator to the url
|
|
93
93
|
targetInfo.endpoint += "/";
|
|
94
94
|
}
|
|
95
|
-
//
|
|
96
|
-
targetInfo.endpoint
|
|
95
|
+
// See if we already have a qs defined and appending another qs
|
|
96
|
+
if (methodInfo.url.indexOf("?") == 0 && targetInfo.endpoint.indexOf('?') > 0) {
|
|
97
|
+
// Append the url
|
|
98
|
+
targetInfo.endpoint += '&' + methodInfo.url.substring(1);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// Append the url
|
|
102
|
+
targetInfo.endpoint += methodInfo.url;
|
|
103
|
+
}
|
|
97
104
|
}
|
|
98
105
|
// Create a new object
|
|
99
106
|
var obj = new _1.Base(targetInfo);
|