Browse Source

Merge 73622699cf into 9b590efa87

pull/7267/merge
Shane Greaves 6 days ago
committed by GitHub
parent
commit
40e2175a06
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      apps/api/src/app/app.controller.ts
  2. 3
      apps/api/src/services/data-provider/manual/manual.service.ts
  3. 2
      apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts

8
apps/api/src/app/app.controller.ts

@ -1,9 +1,11 @@
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service';
import { Controller } from '@nestjs/common'; import { Controller, Logger } from '@nestjs/common';
@Controller() @Controller()
export class AppController { export class AppController {
private readonly logger = new Logger(AppController.name);
public constructor( public constructor(
private readonly exchangeRateDataService: ExchangeRateDataService private readonly exchangeRateDataService: ExchangeRateDataService
) { ) {
@ -13,6 +15,8 @@ export class AppController {
private async initialize() { private async initialize() {
try { try {
await this.exchangeRateDataService.initialize(); await this.exchangeRateDataService.initialize();
} catch {} } catch (error) {
this.logger.error(error);
}
} }
} }

3
apps/api/src/services/data-provider/manual/manual.service.ts

@ -161,7 +161,8 @@ export class ManualService implements DataProviderInterface {
where: { where: {
symbol: { symbol: {
in: symbols in: symbols
} },
dataSource: this.getName()
} }
}); });

2
apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts

@ -203,7 +203,7 @@ export class ExchangeRateDataService {
} }
} }
const resultExtended = result; const resultExtended = { ...result };
for (const symbol of Object.keys(result)) { for (const symbol of Object.keys(result)) {
const [currency1, currency2] = symbol.match(/.{1,3}/g); const [currency1, currency2] = symbol.match(/.{1,3}/g);

Loading…
Cancel
Save