update product search hook. whitelist cdn

This commit is contained in:
Greg Hoskin
2021-03-29 17:49:14 -06:00
parent e4c1050880
commit 1ebf458fb2
8 changed files with 31 additions and 56 deletions

View File

@@ -9,15 +9,13 @@ const fetcher: Fetcher = async ({ method = 'get', variables, query }) => {
const arg1 = variables[0]
const arg2 = variables[1]
const response = await swell[query][method](arg1, arg2)
console.log(response)
return handleFetchResponse(response)
} else {
const response = await swell[query][method](variables)
console.log(response)
return handleFetchResponse(response)
}
}
if (query) {
if (query in swell) {
return await callSwell()
}
}