Browse Source

Refactoring

pull/4634/head
Thomas Kaul 4 months ago
parent
commit
d10e1d079b
  1. 15
      apps/api/src/app/endpoints/watchlist/watchlist.service.ts

15
apps/api/src/app/endpoints/watchlist/watchlist.service.ts

@ -101,15 +101,14 @@ export class WatchlistService {
where: { id: userId }
});
const quotes = await this.dataProviderService.getQuotes({
items: user.watchlist.map(({ dataSource, symbol }) => {
return { dataSource, symbol };
const [assetProfiles, quotes] = await Promise.all([
this.symbolProfileService.getSymbolProfiles(user.watchlist),
this.dataProviderService.getQuotes({
items: user.watchlist.map(({ dataSource, symbol }) => {
return { dataSource, symbol };
})
})
});
const assetProfiles = await this.symbolProfileService.getSymbolProfiles(
user.watchlist
);
]);
const watchlist = await Promise.all(
user.watchlist.map(async ({ dataSource, symbol }) => {

Loading…
Cancel
Save