1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00

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

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