Fix Proxy to support animation on globe (On Prem) #11
@@ -111,13 +111,14 @@ async function fetchTopCountries(interval = 1440, limit = 100, agentUuid = null,
|
||||
const ulMap = {};
|
||||
if (ulData) {
|
||||
for (const r of ulData) {
|
||||
const cc = r.country?.code;
|
||||
const cc = r.country?.code || r.country?.label;
|
||||
if (cc) ulMap[cc] = r.upload ?? 0;
|
||||
}
|
||||
}
|
||||
return dlData.map(r => {
|
||||
const cc = r.country?.code || r.country?.label;
|
||||
return {
|
||||
country_code: r.country?.code ?? 'Unknown',
|
||||
country_code: cc || 'Unknown',
|
||||
country_name: r.country?.label ?? '',
|
||||
download: r.download ?? 0,
|
||||
upload: ulMap[r.country?.code] ?? 0,
|
||||
|
||||
Reference in new issue
Block a user