mirror of
https://github.com/vercel/commerce.git
synced 2025-07-24 10:41:23 +00:00
update remove item from cart, landing page fetch, image normalization
This commit is contained in:
@@ -21,9 +21,10 @@ const getAllProducts = async (options: {
|
||||
}): Promise<ReturnType> => {
|
||||
let { config, variables = { first: 250 } } = options ?? {}
|
||||
config = getConfig(config)
|
||||
const { results } = await config.fetchSwell('products', 'get')
|
||||
const { results } = await config.fetchSwell('products', 'list', {
|
||||
limit: variables.first,
|
||||
})
|
||||
const products = results.map((product) => normalizeProduct(product)) ?? []
|
||||
|
||||
return {
|
||||
products,
|
||||
}
|
||||
|
Reference in New Issue
Block a user