mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
update get categories hook
This commit is contained in:
9
framework/swell/api/utils/fetch-swell-api.ts
Normal file
9
framework/swell/api/utils/fetch-swell-api.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { swellConfig } from '../../index'
|
||||
|
||||
const fetchSwellApi = async (query: string, method: string) => {
|
||||
const { swell } = swellConfig
|
||||
const res = await swell[query][method]()
|
||||
|
||||
return res
|
||||
}
|
||||
export default fetchSwellApi
|
Reference in New Issue
Block a user