@longvansoftware/service-js-client 1.4.5 → 1.4.7
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/config/config.js
CHANGED
@@ -33,7 +33,7 @@ exports.environmentEndpoints = {
|
|
33
33
|
dns: "https://admin.longvan.net/powerdns/dns",
|
34
34
|
crm_camping: "https://crm.longvan.vn/campaign-gateway/graphql",
|
35
35
|
order_graphQL: "https://api-gateway.longvan.vn/order-cloud-service/graphql",
|
36
|
-
paymentLV: "https://payment
|
36
|
+
paymentLV: "https://payment.longvan.vn/graphql",
|
37
37
|
resource_permission: "https://api-gateway.longvan.vn/resource-permission-api/graphql"
|
38
38
|
},
|
39
39
|
};
|
@@ -1217,7 +1217,7 @@ class OrderService extends serviceSDK_1.Service {
|
|
1217
1217
|
const endpoint = `/front/orders/${this.orgId}/${store ? store : this.storeId}/${orderId}/${orderItemId}/remove?updated_by=${updated_by}&reason=${reason}`;
|
1218
1218
|
const method = "DELETE";
|
1219
1219
|
try {
|
1220
|
-
const response = yield this.
|
1220
|
+
const response = yield this.restApiCallWithNoToken(endpoint, method);
|
1221
1221
|
return response;
|
1222
1222
|
}
|
1223
1223
|
catch (error) {
|
@@ -1238,7 +1238,7 @@ class OrderService extends serviceSDK_1.Service {
|
|
1238
1238
|
const endpoint = `/front/orders/${this.orgId}/${store ? store : this.storeId}/${orderId}/orderLineItem?updated_by=${updated_by}`;
|
1239
1239
|
const method = "POST";
|
1240
1240
|
try {
|
1241
|
-
const response = yield this.
|
1241
|
+
const response = yield this.restApiCallWithNoToken(endpoint, method, data);
|
1242
1242
|
return response;
|
1243
1243
|
}
|
1244
1244
|
catch (error) {
|
@@ -96,7 +96,7 @@ class Service {
|
|
96
96
|
restApiCallWithToken(path, method, data, headers) {
|
97
97
|
return __awaiter(this, void 0, void 0, function* () {
|
98
98
|
try {
|
99
|
-
const modifiedHeaders = Object.assign({}, headers);
|
99
|
+
const modifiedHeaders = Object.assign(Object.assign({}, headers), { PartnerId: this.orgId, Authorization: "Bearer " + this.token });
|
100
100
|
const response = yield (0, axios_1.default)({
|
101
101
|
url: this.endpoint + path,
|
102
102
|
method,
|