From 4ccabde251496ed031338231e84bd076572212f1 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 8 Aug 2022 19:25:38 +0200 Subject: [PATCH] Feature/simplify exchange rate service initialization (#1128) * Simplify initialization * Update changelog --- CHANGELOG.md | 6 ++++++ apps/api/src/app/app.controller.ts | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61839cec6..1bd17aead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Simplified the initialization of the exchange rate service + ## 1.177.0 - 04.08.2022 ### Added diff --git a/apps/api/src/app/app.controller.ts b/apps/api/src/app/app.controller.ts index 32a4982fe..d92a7a3ce 100644 --- a/apps/api/src/app/app.controller.ts +++ b/apps/api/src/app/app.controller.ts @@ -1,19 +1,16 @@ import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; -import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Controller } from '@nestjs/common'; @Controller() export class AppController { public constructor( - private readonly exchangeRateDataService: ExchangeRateDataService, - private readonly prismaService: PrismaService + private readonly exchangeRateDataService: ExchangeRateDataService ) { this.initialize(); } private async initialize() { try { - await this.prismaService.$connect(); await this.exchangeRateDataService.initialize(); } catch {} }