MT#60711 removing lang parameter when we use api v2

Due to some changes on api v2, we cannot pass a parameter that doesn't exist to api.
In csc, we put the lang parameter in each call but it returns an error when using api v2.
So in the case we use api v2 we just removed this parameter.

Change-Id: Ib9e5decc67178d65626a285688e41b88b16e0b03
(cherry picked from commit 51bc01af96)
(cherry picked from commit 44d1346a91)
mr12.5.1
Hugo Zigha 8 months ago committed by Marco Capetta
parent 4410e605b3
commit dd2298b32a

@ -84,6 +84,7 @@ export function initAPI ({ baseURL }) {
if (config.method === 'POST' && (config.data === undefined || config.data === null)) {
config.data = {}
}
if (!config?.url.includes('v2')) {
if (config.params) {
config.params = {
...config.params,
@ -94,6 +95,8 @@ export function initAPI ({ baseURL }) {
lang: getCurrentLangAsV1Format()
}
}
}
return config
}
})

Loading…
Cancel
Save