@nuskin/ns-product-lib 2.7.0-cx24-3682.4 → 2.7.0-cx24-3682.6

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.7.0-cx24-3682.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.5...v2.7.0-cx24-3682.6) (2023-03-25)
2
+
3
+
4
+ ### New
5
+
6
+ * MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([13f2b76](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/13f2b76990dd2e4f4226367332212dcc7bd19977)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
7
+
8
+ # [2.7.0-cx24-3682.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.4...v2.7.0-cx24-3682.5) (2023-03-25)
9
+
10
+
11
+ ### New
12
+
13
+ * MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([588161d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/588161d54fa2e97f6bee2fe33523f3f1bdcb1ed2)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
14
+
1
15
  # [2.7.0-cx24-3682.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.3...v2.7.0-cx24-3682.4) (2023-03-24)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.7.0-cx24-3682.4",
3
+ "version": "2.7.0-cx24-3682.6",
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": {
@@ -2,25 +2,27 @@
2
2
  const httpStatus = { notFound: 404 };
3
3
 
4
4
  /**
5
- * productNotFound is called when an equinox product is not found
5
+ * productNotFound returns a model "ProductNotFound" when the status code is Not Found.
6
6
  * Note: Do not polute this file. Create a new file for new interceptor.
7
- *
7
+ *
8
8
  * @param {import('axios').AxiosError} error
9
- * @returns {import('../').EquinoxResponse}
9
+ * @returns {import('axios').AxiosResponse<import('../').EquinoxResponse>}
10
10
  */
11
11
  function productNotFound(error) {
12
12
  const segments = 'catalogs/search';
13
- const { config, status } = error;
13
+ const { config, response } = error;
14
14
 
15
- if (status === httpStatus.notFound && config.url.includes(segments)) {
15
+ if (response.status === httpStatus.notFound && config.url.includes(segments)) {
16
16
  const params = new URLSearchParams(config.url);
17
17
  const filterParam = Array.from(params.values())[0];
18
18
  const sku = getSKU(filterParam);
19
19
 
20
20
  if (sku !== null) {
21
21
  return {
22
- product: {
23
- sku
22
+ data: {
23
+ product: {
24
+ sku
25
+ }
24
26
  }
25
27
  }
26
28
  }