Fix client API URLs not being cleaned properly

This commit is contained in:
Andrew Kingston 2021-01-26 09:40:04 +00:00
parent 03e6799258
commit bfd24571b2
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ const makeCachedApiCall = async params => {
const requestApiCall = method => async params => { const requestApiCall = method => async params => {
const { url, cache = false } = params const { url, cache = false } = params
const fixedUrl = `/${url}`.replace("//", "/") const fixedUrl = `/${url}`.replace("//", "/")
const enrichedParams = { ...params, method, fixedUrl } const enrichedParams = { ...params, method, url: fixedUrl }
return await (cache ? makeCachedApiCall : makeApiCall)(enrichedParams) return await (cache ? makeCachedApiCall : makeApiCall)(enrichedParams)
} }