mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
changes
This commit is contained in:
@@ -94,7 +94,7 @@ async function getAllProducts({
|
||||
variables?: ProductVariables
|
||||
config?: BigcommerceConfig
|
||||
preview?: boolean
|
||||
} = {}): Promise<{ products: Product[] }> {
|
||||
} = {}): Promise<{ products: Product[] | any[] }> {
|
||||
config = getConfig(config)
|
||||
|
||||
const locale = vars.locale || config.locale
|
||||
@@ -127,7 +127,7 @@ async function getAllProducts({
|
||||
})
|
||||
}
|
||||
|
||||
return { products: products.map(normalizeProduct) }
|
||||
return { products }
|
||||
}
|
||||
|
||||
export default getAllProducts
|
||||
|
@@ -93,7 +93,7 @@ async function getProduct({
|
||||
variables: ProductVariables
|
||||
config?: BigcommerceConfig
|
||||
preview?: boolean
|
||||
}): Promise<Product | {}> {
|
||||
}): Promise<Product | {} | any> {
|
||||
config = getConfig(config)
|
||||
|
||||
const locale = vars.locale || config.locale
|
||||
@@ -111,7 +111,7 @@ async function getProduct({
|
||||
setProductLocaleMeta(product)
|
||||
}
|
||||
|
||||
return { product: normalizeProduct(product) }
|
||||
return { product }
|
||||
}
|
||||
|
||||
return {}
|
||||
|
Reference in New Issue
Block a user