@ikas/storefront-api 4.0.0-alpha.40 → 4.0.0-alpha.42
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/package.json +5 -5
- package/src/api/product/index.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-api",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.42",
|
|
4
4
|
"author": "Umut Ozan Yıldırım",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "API functions that returns models from the ikas-storefront-models package.",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
24
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
25
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
24
|
+
"@ikas/storefront-config": "^4.0.0-alpha.42",
|
|
25
|
+
"@ikas/storefront-models": "^4.0.0-alpha.42",
|
|
26
26
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
27
27
|
"prettier": "^2.2.1",
|
|
28
28
|
"rollup": "^2.75.6",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"axios": "^0.26.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
39
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
38
|
+
"@ikas/storefront-config": "^4.0.0-alpha.42",
|
|
39
|
+
"@ikas/storefront-models": "^4.0.0-alpha.42",
|
|
40
40
|
"axios": "^0.26.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/api/product/index.ts
CHANGED
|
@@ -107,7 +107,7 @@ export async function getRelatedProducts(
|
|
|
107
107
|
await import("../../__api/queries/getRelatedProducts")
|
|
108
108
|
).default;
|
|
109
109
|
const response = await _getRelatedProducts(params);
|
|
110
|
-
const products = response.data.
|
|
110
|
+
const products = response.data.map((d: SearchProduct) =>
|
|
111
111
|
simpleToProduct(d)
|
|
112
112
|
) as IkasProduct[];
|
|
113
113
|
|
|
@@ -119,11 +119,11 @@ export async function getRelatedProducts(
|
|
|
119
119
|
response.data
|
|
120
120
|
? {
|
|
121
121
|
data: products,
|
|
122
|
-
count: response.data.
|
|
122
|
+
count: response.data.length,
|
|
123
123
|
facets: null,
|
|
124
124
|
limit: 20,
|
|
125
125
|
page: 1,
|
|
126
|
-
totalCount: response.data.
|
|
126
|
+
totalCount: response.data.length,
|
|
127
127
|
}
|
|
128
128
|
: null,
|
|
129
129
|
response.graphQLErrors
|