mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
update get-page and get-all-pages content hooks
This commit is contained in:
@@ -21,9 +21,11 @@ const getAllProducts = async (options: {
|
||||
}): Promise<ReturnType> => {
|
||||
let { config, variables = { first: 250 } } = options ?? {}
|
||||
config = getConfig(config)
|
||||
const { results } = await config.fetchSwell('products', 'list', {
|
||||
limit: variables.first,
|
||||
})
|
||||
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