From 39cba0a8eb5779957a1e701460d836089b025475 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Wed, 28 Jul 2021 15:45:11 +0200 Subject: [PATCH] Refactoring --- .../src/app/core/interfaces/timeline-specification.interface.ts | 2 +- apps/api/src/app/core/market-data.service.ts | 1 + apps/api/src/app/core/portfolio-calculator.spec.ts | 2 +- apps/api/src/app/core/portfolio-calculator.ts | 2 +- apps/api/src/app/portfolio/portfolio.service.ts | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/api/src/app/core/interfaces/timeline-specification.interface.ts b/apps/api/src/app/core/interfaces/timeline-specification.interface.ts index 26228a1fa..1cd6510c7 100644 --- a/apps/api/src/app/core/interfaces/timeline-specification.interface.ts +++ b/apps/api/src/app/core/interfaces/timeline-specification.interface.ts @@ -1,4 +1,4 @@ -export type Accuracy = 'year' | 'month' | 'day'; +export type Accuracy = 'day' | 'month' | 'year'; export interface TimelineSpecification { accuracy: Accuracy; diff --git a/apps/api/src/app/core/market-data.service.ts b/apps/api/src/app/core/market-data.service.ts index b84c31632..95d42da43 100644 --- a/apps/api/src/app/core/market-data.service.ts +++ b/apps/api/src/app/core/market-data.service.ts @@ -2,6 +2,7 @@ import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { resetHours } from '@ghostfolio/common/helper'; import { Injectable } from '@nestjs/common'; import { MarketData } from '@prisma/client'; + import { DateQuery } from './interfaces/date-query.interface'; @Injectable() diff --git a/apps/api/src/app/core/portfolio-calculator.spec.ts b/apps/api/src/app/core/portfolio-calculator.spec.ts index 47cae8b5d..02c571ad4 100644 --- a/apps/api/src/app/core/portfolio-calculator.spec.ts +++ b/apps/api/src/app/core/portfolio-calculator.spec.ts @@ -1,11 +1,11 @@ import { CurrentRateService } from '@ghostfolio/api/app/core/current-rate.service'; import { GetValueParams } from '@ghostfolio/api/app/core/interfaces/get-value-params.interface'; import { GetValuesParams } from '@ghostfolio/api/app/core/interfaces/get-values-params.interface'; -import { PortfolioCalculator } from '@ghostfolio/api/app/core/portfolio-calculator'; import { PortfolioOrder } from '@ghostfolio/api/app/core/interfaces/portfolio-order.interface'; import { TimelinePeriod } from '@ghostfolio/api/app/core/interfaces/timeline-period.interface'; import { TimelineSpecification } from '@ghostfolio/api/app/core/interfaces/timeline-specification.interface'; import { TransactionPoint } from '@ghostfolio/api/app/core/interfaces/transaction-point.interface'; +import { PortfolioCalculator } from '@ghostfolio/api/app/core/portfolio-calculator'; import { OrderType } from '@ghostfolio/api/models/order-type'; import { resetHours } from '@ghostfolio/common/helper'; import { Currency } from '@prisma/client'; diff --git a/apps/api/src/app/core/portfolio-calculator.ts b/apps/api/src/app/core/portfolio-calculator.ts index 3a4421988..f0cd0b5d2 100644 --- a/apps/api/src/app/core/portfolio-calculator.ts +++ b/apps/api/src/app/core/portfolio-calculator.ts @@ -6,8 +6,8 @@ import { Accuracy, TimelineSpecification } from '@ghostfolio/api/app/core/interfaces/timeline-specification.interface'; -import { TransactionPoint } from '@ghostfolio/api/app/core/interfaces/transaction-point.interface'; import { TransactionPointSymbol } from '@ghostfolio/api/app/core/interfaces/transaction-point-symbol.interface'; +import { TransactionPoint } from '@ghostfolio/api/app/core/interfaces/transaction-point.interface'; import { OrderType } from '@ghostfolio/api/models/order-type'; import { DATE_FORMAT, parseDate, resetHours } from '@ghostfolio/common/helper'; import { TimelinePosition } from '@ghostfolio/common/interfaces'; diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index b2df36924..7a8617805 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1,8 +1,8 @@ import { AccountService } from '@ghostfolio/api/app/account/account.service'; import { CurrentRateService } from '@ghostfolio/api/app/core/current-rate.service'; -import { PortfolioCalculator } from '@ghostfolio/api/app/core/portfolio-calculator'; import { PortfolioOrder } from '@ghostfolio/api/app/core/interfaces/portfolio-order.interface'; import { TimelineSpecification } from '@ghostfolio/api/app/core/interfaces/timeline-specification.interface'; +import { PortfolioCalculator } from '@ghostfolio/api/app/core/portfolio-calculator'; import { OrderService } from '@ghostfolio/api/app/order/order.service'; import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.service'; import { UserService } from '@ghostfolio/api/app/user/user.service';