Browse Source

Reuse type

pull/2002/head
Thomas 2 years ago
parent
commit
8f212c8e8b
  1. 8
      apps/api/src/app/benchmark/benchmark.service.ts

8
apps/api/src/app/benchmark/benchmark.service.ts

@ -120,9 +120,9 @@ export class BenchmarkService {
public async getBenchmarkAssetProfiles(): Promise<Partial<SymbolProfile>[]> { public async getBenchmarkAssetProfiles(): Promise<Partial<SymbolProfile>[]> {
const symbolProfileIds: string[] = ( const symbolProfileIds: string[] = (
((await this.propertyService.getByKey(PROPERTY_BENCHMARKS)) as { ((await this.propertyService.getByKey(
symbolProfileId: string; PROPERTY_BENCHMARKS
}[]) ?? [] )) as BenchmarkProperty[]) ?? []
).map(({ symbolProfileId }) => { ).map(({ symbolProfileId }) => {
return symbolProfileId; return symbolProfileId;
}); });
@ -228,7 +228,7 @@ export class BenchmarkService {
PROPERTY_BENCHMARKS PROPERTY_BENCHMARKS
)) as BenchmarkProperty[]) ?? []; )) as BenchmarkProperty[]) ?? [];
benchmarks.push({ symbolProfileId: symbolProfile.id } as BenchmarkProperty); benchmarks.push({ symbolProfileId: symbolProfile.id });
benchmarks = uniqBy(benchmarks, 'symbolProfileId'); benchmarks = uniqBy(benchmarks, 'symbolProfileId');

Loading…
Cancel
Save