@nuskin/ns-product-lib 2.11.0-cx24-5092.1 → 2.11.0-cx24-5092.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/src/productData.js +10 -7
- package/src/productGraphQL.js +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
# [2.11.0-cx24-5092.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.11.0-cx24-5092.2...v2.11.0-cx24-5092.3) (2023-09-08)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* Moving from AEM to CS for EQ markets ([1c61841](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1c6184105b06c7a04846f78d2e4d939c3ff67e93))
|
7
|
+
|
8
|
+
# [2.11.0-cx24-5092.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.11.0-cx24-5092.1...v2.11.0-cx24-5092.2) (2023-09-08)
|
9
|
+
|
10
|
+
|
11
|
+
### New
|
12
|
+
|
13
|
+
* Moving from AEM to CS for EQ markets ([53d373c](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/53d373c6a7221409e53e053febf4b7bd49f963ae))
|
14
|
+
* Moving from AEM to CS for EQ markets ([6d866bf](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/6d866bfcd20ce4c2d1385abca29458ae49ab35fd))
|
15
|
+
|
1
16
|
# [2.11.0-cx24-5092.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.10.1...v2.11.0-cx24-5092.1) (2023-09-07)
|
2
17
|
|
3
18
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -25,15 +25,18 @@ const ProductData = {
|
|
25
25
|
getProductData: async function (skus, locale, market, isEquinoxEnabled = false) {
|
26
26
|
const localeMarket = `${locale}_${market}`;
|
27
27
|
|
28
|
-
if (isEquinoxEnabled) {
|
29
|
-
const config = (await getConfiguration(['Equinox_Markets'])).Equinox_Markets;
|
30
|
-
const graphQLResponse = ProductGraphQL.getProductFromGraphQL(skus)
|
31
|
-
console.log(graphQLResponse)
|
32
28
|
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
const config = (await getConfiguration(['Equinox_Markets'])).Equinox_Markets;
|
30
|
+
const graphQLResponse = ProductGraphQL.getProductFromGraphQL(skus.toString())
|
31
|
+
console.log(graphQLResponse)
|
32
|
+
console.log(isEquinoxEnabled)
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
if (config.active) {
|
37
|
+
return await this.getProductFromEquinox(skus, localeMarket, config);
|
36
38
|
}
|
39
|
+
|
37
40
|
return await this.getProductFromLegacy(skus, localeMarket);
|
38
41
|
},
|
39
42
|
|
package/src/productGraphQL.js
CHANGED
@@ -13,7 +13,7 @@ const ProductGraphQL = {
|
|
13
13
|
variables: { "market": "us", "language": "en", "id": sku, "useContentSource": null, "quantity": 1, "okta": null }
|
14
14
|
});
|
15
15
|
|
16
|
-
let
|
16
|
+
let axiosGqlConfig = {
|
17
17
|
method: 'post',
|
18
18
|
url: 'https://product.api.test.nuskin.com/graphql',
|
19
19
|
headers: {
|
@@ -28,7 +28,7 @@ const ProductGraphQL = {
|
|
28
28
|
data: data
|
29
29
|
};
|
30
30
|
|
31
|
-
axios.request(
|
31
|
+
axios.request(axiosGqlConfig)
|
32
32
|
.then((response) => {
|
33
33
|
return response.data
|
34
34
|
})
|