increase the request timeout in frontend if the timeout of requesting third-party exchange rates api exceeds the default time
This commit is contained in:
@@ -103,3 +103,7 @@ export function getAmapApiExternalProxyUrl() {
|
||||
export function getAmapApplicationSecret() {
|
||||
return getServerSetting('amas');
|
||||
}
|
||||
|
||||
export function getExchangeRatesRequestTimeout() {
|
||||
return getServerSetting('errt');
|
||||
}
|
||||
|
||||
+4
-2
@@ -9,7 +9,8 @@ import {
|
||||
import {
|
||||
getGoogleMapAPIKey,
|
||||
getBaiduMapAK,
|
||||
getAmapApplicationKey
|
||||
getAmapApplicationKey,
|
||||
getExchangeRatesRequestTimeout
|
||||
} from './server_settings.js';
|
||||
import { getTimezoneOffsetMinutes } from './datetime.js';
|
||||
import { generateRandomUUID } from './misc.js';
|
||||
@@ -619,7 +620,8 @@ export default {
|
||||
},
|
||||
getLatestExchangeRates: ({ ignoreError }) => {
|
||||
return axios.get('v1/exchange_rates/latest.json', {
|
||||
ignoreError: !!ignoreError
|
||||
ignoreError: !!ignoreError,
|
||||
timeout: getExchangeRatesRequestTimeout() || apiConstants.defaultTimeout
|
||||
});
|
||||
},
|
||||
generateQrCodeUrl: (qrCodeName) => {
|
||||
|
||||
Reference in New Issue
Block a user