drapcode-developer-sdk 1.0.15 → 1.0.16
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/index.js +8 -5
- package/build/methods/methods.js +2 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -175,11 +175,14 @@ var DrapcodeApis = /** @class */ (function () {
|
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
177
|
DrapcodeApis.prototype.getBaseUrl = function () {
|
|
178
|
-
|
|
179
|
-
if (envSub) {
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
178
|
+
// const envSub = this.getEnvSubdomain();
|
|
179
|
+
// if (envSub) {
|
|
180
|
+
// if (envSub !== "preview") {
|
|
181
|
+
// return `${this.protocol}://${this.seoName}.api.${envSub}.${this.API_PATH}/v${this.version}/developer`;
|
|
182
|
+
// }
|
|
183
|
+
// return `${this.protocol}://${this.seoName}.${envSub}.${this.API_PATH}/v${this.version}/developer`;
|
|
184
|
+
// }
|
|
185
|
+
return "".concat(this.protocol, "://").concat(this.seoName, ".").concat(this.API_PATH, "/v").concat(this.version, "/developer");
|
|
183
186
|
};
|
|
184
187
|
DrapcodeApis.prototype.getHeaders = function () {
|
|
185
188
|
var headers = {
|
package/build/methods/methods.js
CHANGED
|
@@ -60,9 +60,11 @@ var request = function (version, url, options, process) {
|
|
|
60
60
|
if (version === 1) {
|
|
61
61
|
return [2 /*return*/, result];
|
|
62
62
|
}
|
|
63
|
+
console.log("result :>> ", result);
|
|
63
64
|
return [2 /*return*/, process ? (0, util_1.processResponse)(result) : result];
|
|
64
65
|
case 5:
|
|
65
66
|
error_1 = _b.sent();
|
|
67
|
+
console.log("error :>> ", error_1);
|
|
66
68
|
message = (_a = error_1 === null || error_1 === void 0 ? void 0 : error_1.message) === null || _a === void 0 ? void 0 : _a.replace("fetch failed", "Network Error");
|
|
67
69
|
return [2 /*return*/, { code: 500, error: message, message: message }];
|
|
68
70
|
case 6: return [2 /*return*/];
|