@nuskin/ns-product-lib 2.5.0-cx24-3168.2 → 2.5.0-cx24-3168.3

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [2.5.0-cx24-3168.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-3168.2...v2.5.0-cx24-3168.3) (2023-01-11)
2
+
3
+
4
+ ### Fix
5
+
6
+ * Equinox API called for non equinox market (CX24-3168) ([f056483](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/f056483d277af8aed1af81d70411b7da4bc8f2b6))
7
+
1
8
  # [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
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.5.0-cx24-3168.2",
3
+ "version": "2.5.0-cx24-3168.3",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -4,6 +4,7 @@ const { getConfiguration } = require('@nuskin/configuration-sdk');
4
4
  const axios = require("axios");
5
5
  const contentstack = require('./contentstack/contentstack');
6
6
  const Product = require("./product");
7
+ let config = {};
7
8
 
8
9
  /** @type {*} */
9
10
  const ProductData = {
@@ -17,12 +18,14 @@ const ProductData = {
17
18
  const localeMarket = `${locale}_${market}`;
18
19
 
19
20
  if (isEquinoxEnabled) {
20
- const config = (await getConfiguration({
21
- configMapNames: ['Equinox_Markets'],
22
- country: locale.split('_')[1],
23
- environment: 'test',
24
- clientId: '735b1eb810304bba966af0891ab54053'
25
- })).Equinox_Markets;
21
+ if (!config) {
22
+ config = (await getConfiguration({
23
+ configMapNames: ['Equinox_Markets'],
24
+ country: locale.split('_')[1],
25
+ environment: 'test',
26
+ clientId: '735b1eb810304bba966af0891ab54053'
27
+ })).Equinox_Markets;
28
+ }
26
29
 
27
30
  if (config.store_id !== null) {
28
31
  return await this.getProductFromEquinox(skus, localeMarket, config);