|
|
@ -16,6 +16,7 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface { |
|
|
private static baseUrl = 'https://www.trackinsight.com'; |
|
|
private static baseUrl = 'https://www.trackinsight.com'; |
|
|
|
|
|
|
|
|
private static countriesMapping = { |
|
|
private static countriesMapping = { |
|
|
|
|
|
'Czech Republic': 'CZ', |
|
|
'Republic of Korea': 'KR', |
|
|
'Republic of Korea': 'KR', |
|
|
'Russian Federation': 'RU', |
|
|
'Russian Federation': 'RU', |
|
|
Turkey: 'TR', |
|
|
Turkey: 'TR', |
|
|
@ -125,13 +126,14 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface { |
|
|
for (const [name, value] of Object.entries<any>( |
|
|
for (const [name, value] of Object.entries<any>( |
|
|
holdings?.countries ?? {} |
|
|
holdings?.countries ?? {} |
|
|
)) { |
|
|
)) { |
|
|
response.countries.push({ |
|
|
const code = getCountryCodeByName({ |
|
|
code: getCountryCodeByName({ |
|
|
name, |
|
|
name, |
|
|
aliases: TrackinsightDataEnhancerService.countriesMapping |
|
|
aliases: TrackinsightDataEnhancerService.countriesMapping |
|
|
|
|
|
}), |
|
|
|
|
|
weight: value.weight |
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (code) { |
|
|
|
|
|
response.countries.push({ code, weight: value.weight }); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|