update get product hook

This commit is contained in:
Greg Hoskin
2021-04-01 16:32:12 -06:00
parent 1ebf458fb2
commit 18936b7544
8 changed files with 103 additions and 131 deletions

View File

@@ -32,8 +32,8 @@ export const handler: SWRHook<
const { results, count: found } = await fetch({
query: 'products',
method: 'get',
// variables: { categoryId },
method: 'list',
variables: { category: categoryId },
})
const products = results.map((product) => normalizeProduct(product))