4
0
forked from crowetic/commerce
commerce/framework/swell/api/utils/fetch-swell-api.ts
2021-04-04 14:45:48 -06:00

14 lines
273 B
TypeScript

import { swellConfig } from '../../index'
const fetchSwellApi = async (
query: string,
method: string,
variables: object | string
) => {
const { swell } = swellConfig
const res = await swell[query][method](variables)
return res
}
export default fetchSwellApi