Skip to content

Commit d21c8b6

Browse files
authored
feat: extend default get methods for unified (#7256)
* feat: extend default get methods for unified * chore: changeset
1 parent c7bca8a commit d21c8b6

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.changeset/thin-zebras-sit.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@vue-storefront/next": minor
3+
"@vue-storefront/nuxt": minor
4+
---
5+
6+
[CHANGED] `defaultMethodsRequestConfig`, so the `getCategory`, and `getPage` methods will use `GET` request as a default.

packages/nuxt/src/runtime/utils/defaults.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export function getDefaultMethodsRequestConfig() {
22
return {
33
unifiedCommerce: {
44
middlewareModule: {
5+
getCategory: { method: "GET" },
56
getCategories: { method: "GET" },
67
getProductDetails: { method: "GET" },
78
getProductReviews: { method: "GET" },
@@ -12,6 +13,7 @@ export function getDefaultMethodsRequestConfig() {
1213
},
1314
unifiedCms: {
1415
middlewareModule: {
16+
getPage: { method: "GET" },
1517
getEntries: { method: "GET" },
1618
},
1719
},

packages/shared/src/helpers/defaultConfigs.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export const defaultMethodsRequestConfig = {
22
unifiedCommerce: {
33
middlewareModule: {
4+
getCategory: { method: "GET" },
45
getCategories: { method: "GET" },
56
getProductDetails: { method: "GET" },
67
getProductReviews: { method: "GET" },
@@ -11,6 +12,7 @@ export const defaultMethodsRequestConfig = {
1112
},
1213
unifiedCms: {
1314
middlewareModule: {
15+
getPage: { method: "GET" },
1416
getEntries: { method: "GET" },
1517
},
1618
},

0 commit comments

Comments
 (0)