|
|
@ -1,19 +1,16 @@
|
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service';
|
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service';
|
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma.service';
|
|
|
|
|
|
|
|
import { Controller } from '@nestjs/common';
|
|
|
|
import { Controller } from '@nestjs/common';
|
|
|
|
|
|
|
|
|
|
|
|
@Controller()
|
|
|
|
@Controller()
|
|
|
|
export class AppController {
|
|
|
|
export class AppController {
|
|
|
|
public constructor(
|
|
|
|
public constructor(
|
|
|
|
private readonly exchangeRateDataService: ExchangeRateDataService,
|
|
|
|
private readonly exchangeRateDataService: ExchangeRateDataService
|
|
|
|
private readonly prismaService: PrismaService
|
|
|
|
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
this.initialize();
|
|
|
|
this.initialize();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async initialize() {
|
|
|
|
private async initialize() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
await this.prismaService.$connect();
|
|
|
|
|
|
|
|
await this.exchangeRateDataService.initialize();
|
|
|
|
await this.exchangeRateDataService.initialize();
|
|
|
|
} catch {}
|
|
|
|
} catch {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|