From 5ba492142401e7c93ea07254758accdf19219bfb Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Wed, 24 May 2023 21:07:38 +0200 Subject: [PATCH] Refactoring --- apps/api/src/app/benchmark/benchmark.service.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/api/src/app/benchmark/benchmark.service.ts b/apps/api/src/app/benchmark/benchmark.service.ts index 39919c32c..73b48068b 100644 --- a/apps/api/src/app/benchmark/benchmark.service.ts +++ b/apps/api/src/app/benchmark/benchmark.service.ts @@ -212,14 +212,14 @@ export class BenchmarkService { dataSource, symbol }: UniqueAsset): Promise> { - const symbolProfile = await this.prismaService.symbolProfile.findFirst({ + const assetProfile = await this.prismaService.symbolProfile.findFirst({ where: { dataSource, symbol } }); - if (!symbolProfile) { + if (!assetProfile) { return; } @@ -228,7 +228,7 @@ export class BenchmarkService { PROPERTY_BENCHMARKS )) as BenchmarkProperty[]) ?? []; - benchmarks.push({ symbolProfileId: symbolProfile.id }); + benchmarks.push({ symbolProfileId: assetProfile.id }); benchmarks = uniqBy(benchmarks, 'symbolProfileId'); @@ -240,8 +240,8 @@ export class BenchmarkService { return { dataSource, symbol, - id: symbolProfile.id, - name: symbolProfile.name + id: assetProfile.id, + name: assetProfile.name }; }