Browse Source

Fix client API URLs not being cleaned properly

pull/4023/head
Andrew Kingston 5 years ago
parent
commit
bfd24571b2
  1. 2
      packages/client/src/api/api.js

2
packages/client/src/api/api.js

@ -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)
} }

Loading…
Cancel
Save