Browse Source

Refactoring

pull/314/head
Thomas 4 years ago
parent
commit
3aee480ccb
  1. 8
      apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts

8
apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts

@ -99,11 +99,9 @@ export class YahooFinanceService implements DataProviderInterface {
value.summaryProfile?.country value.summaryProfile?.country
) { ) {
try { try {
const [code] = Object.entries(countries).find( const [code] = Object.entries(countries).find(([, country]) => {
([, currentCountry]) => { return country.name === value.summaryProfile?.country;
return currentCountry.name === value.summaryProfile?.country; });
}
);
if (code) { if (code) {
response[symbol].countries = [{ code, weight: 1 }]; response[symbol].countries = [{ code, weight: 1 }];

Loading…
Cancel
Save