Fixing removal of full path function (adding back original functionality).

This commit is contained in:
mike12345567 2021-01-11 10:01:02 +00:00
parent e94cdf1f8e
commit ef0787917a
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,8 @@ 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 enrichedParams = { ...params, method, url } const fixedUrl = `/${url}`.replace("//", "/")
const enrichedParams = { ...params, method, fixedUrl }
return await (cache ? makeCachedApiCall : makeApiCall)(enrichedParams) return await (cache ? makeCachedApiCall : makeApiCall)(enrichedParams)
} }