commerce/providers/swell/api/utils/fetch-swell-api.ts
Loui Nissen-Petersen 03dcf96fb1 rename folder
2021-07-16 16:58:03 +02:00

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