mirror of
https://github.com/vercel/commerce.git
synced 2025-06-18 21:21:21 +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 },
|
||||
config,
|
||||
}) => {
|
||||
let filter: any = {}
|
||||
let filter: any = {
|
||||
kind: 'SimpleProduct',
|
||||
}
|
||||
let sort = {}
|
||||
|
||||
if (search) filter['$text'] = { $search: search }
|
||||
|
@ -54,6 +54,9 @@ async function getAllProductPaths({
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
PostBody: {
|
||||
filter: {
|
||||
kind: 'SimpleProduct',
|
||||
},
|
||||
structure: {
|
||||
translation: 1,
|
||||
},
|
||||
|
@ -51,6 +51,9 @@ async function getAllProducts({
|
||||
body: JSON.stringify({
|
||||
lang: locale,
|
||||
PostBody: {
|
||||
filter: {
|
||||
kind: 'SimpleProduct',
|
||||
},
|
||||
structure: {
|
||||
code: 1,
|
||||
id: 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user