From 8f212c8e8b55cef6eb3328c9bd4dfe4197785e11 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Wed, 24 May 2023 20:59:07 +0200 Subject: [PATCH] Reuse type --- apps/api/src/app/benchmark/benchmark.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/api/src/app/benchmark/benchmark.service.ts b/apps/api/src/app/benchmark/benchmark.service.ts index bc8670bc6..39919c32c 100644 --- a/apps/api/src/app/benchmark/benchmark.service.ts +++ b/apps/api/src/app/benchmark/benchmark.service.ts @@ -120,9 +120,9 @@ export class BenchmarkService { public async getBenchmarkAssetProfiles(): Promise[]> { const symbolProfileIds: string[] = ( - ((await this.propertyService.getByKey(PROPERTY_BENCHMARKS)) as { - symbolProfileId: string; - }[]) ?? [] + ((await this.propertyService.getByKey( + PROPERTY_BENCHMARKS + )) as BenchmarkProperty[]) ?? [] ).map(({ symbolProfileId }) => { return symbolProfileId; }); @@ -228,7 +228,7 @@ export class BenchmarkService { PROPERTY_BENCHMARKS )) as BenchmarkProperty[]) ?? []; - benchmarks.push({ symbolProfileId: symbolProfile.id } as BenchmarkProperty); + benchmarks.push({ symbolProfileId: symbolProfile.id }); benchmarks = uniqBy(benchmarks, 'symbolProfileId');