mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 05:31:22 +00:00
fix: get only simple products
This commit is contained in:
parent
e1f2e16b3d
commit
09bc41bb2f
@ -17,7 +17,9 @@ const getProducts: ProductsHandlers['getProducts'] = async ({
|
|||||||
body: { search, category, brand, sort: sortParam },
|
body: { search, category, brand, sort: sortParam },
|
||||||
config,
|
config,
|
||||||
}) => {
|
}) => {
|
||||||
let filter: any = {}
|
let filter: any = {
|
||||||
|
kind: 'SimpleProduct',
|
||||||
|
}
|
||||||
let sort = {}
|
let sort = {}
|
||||||
|
|
||||||
if (search) filter['$text'] = { $search: search }
|
if (search) filter['$text'] = { $search: search }
|
||||||
|
@ -54,6 +54,9 @@ async function getAllProductPaths({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
PostBody: {
|
PostBody: {
|
||||||
|
filter: {
|
||||||
|
kind: 'SimpleProduct',
|
||||||
|
},
|
||||||
structure: {
|
structure: {
|
||||||
translation: 1,
|
translation: 1,
|
||||||
},
|
},
|
||||||
|
@ -51,6 +51,9 @@ async function getAllProducts({
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
lang: locale,
|
lang: locale,
|
||||||
PostBody: {
|
PostBody: {
|
||||||
|
filter: {
|
||||||
|
kind: 'SimpleProduct',
|
||||||
|
},
|
||||||
structure: {
|
structure: {
|
||||||
code: 1,
|
code: 1,
|
||||||
id: 1,
|
id: 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user