@nuskin/ns-product-lib 2.5.0-cx24-3168.1 → 2.5.0-cx24-3168.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/productData.js +12 -12
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [2.5.0-cx24-3168.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-3168.1...v2.5.0-cx24-3168.2) (2023-01-11)
|
2
|
+
|
3
|
+
|
4
|
+
### Fix
|
5
|
+
|
6
|
+
* Equinox API called for non equinox market (CX24-3168) ([a399f64](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a399f64f4a0717d3e61e9454fb3cc039da9c06bb))
|
7
|
+
|
1
8
|
# [2.5.0-cx24-3168.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.9...v2.5.0-cx24-3168.1) (2023-01-11)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -15,25 +15,25 @@ const ProductData = {
|
|
15
15
|
*/
|
16
16
|
getProductData: async function (skus, locale, market, isEquinoxEnabled = false) {
|
17
17
|
const localeMarket = `${locale}_${market}`;
|
18
|
-
|
18
|
+
|
19
19
|
if (isEquinoxEnabled) {
|
20
|
-
const
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
const config = (await getConfiguration({
|
21
|
+
configMapNames: ['Equinox_Markets'],
|
22
|
+
country: locale.split('_')[1],
|
23
|
+
environment: 'test',
|
24
|
+
clientId: '735b1eb810304bba966af0891ab54053'
|
25
|
+
})).Equinox_Markets;
|
26
|
+
|
27
|
+
if (config.store_id !== null) {
|
28
|
+
return await this.getProductFromEquinox(skus, localeMarket, config);
|
24
29
|
}
|
25
30
|
}
|
26
31
|
|
27
32
|
return await this.getProductFromLegacy(skus, localeMarket);
|
28
33
|
},
|
29
34
|
|
30
|
-
getProductFromEquinox: async function (skus, locale) {
|
31
|
-
|
32
|
-
configMapNames: ['Equinox_Markets'],
|
33
|
-
country: locale.split('_')[1],
|
34
|
-
environment: 'test',
|
35
|
-
clientId: '735b1eb810304bba966af0891ab54053'
|
36
|
-
})).Equinox_Markets;
|
35
|
+
getProductFromEquinox: async function (skus, locale, config) {
|
36
|
+
|
37
37
|
const filter = `{"filters": [{"field": "index_key_skuId","operation": "IN", "value": "${skus.toString()}"}]}`;
|
38
38
|
axios.defaults.withCredentials = true;
|
39
39
|
|