mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
update get product hook
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import { swellConfig } from '../../index'
|
||||
|
||||
const fetchSwellApi = async (query: string, method: string) => {
|
||||
const fetchSwellApi = async (
|
||||
query: string,
|
||||
method: string,
|
||||
variables: object | string
|
||||
) => {
|
||||
const { swell } = swellConfig
|
||||
const res = await swell[query][method]()
|
||||
const res = await swell[query][method](variables)
|
||||
|
||||
return res
|
||||
}
|
||||
|
Reference in New Issue
Block a user