mirror of
https://github.com/vercel/commerce.git
synced 2025-04-30 23:07:50 +00:00
8 lines
219 B
TypeScript
8 lines
219 B
TypeScript
import { swellConfig } from '../..'
|
|
|
|
const fetchApi = async (query: string, method: string, variables: [] = []) => {
|
|
const { swell } = swellConfig
|
|
return swell[query][method](...variables)
|
|
}
|
|
export default fetchApi
|