Browse Source

Initial setup

pull/5533/head
Thomas Kaul 6 days ago
parent
commit
770c688330
  1. 34
      apps/api/src/app/endpoints/data-providers/ghostfolio/ghostfolio.service.ts

34
apps/api/src/app/endpoints/data-providers/ghostfolio/ghostfolio.service.ts

@ -57,26 +57,28 @@ export class GhostfolioService {
symbol symbol
}) })
.then(async (assetProfile) => { .then(async (assetProfile) => {
await this.prismaService.dataProviderGhostfolioResolvedAssetProfile.upsert( if (assetProfile) {
{ await this.prismaService.dataProviderGhostfolioResolvedAssetProfile.upsert(
create: { {
symbol, create: {
currency: assetProfile.currency ?? '',
dataSource: assetProfile.dataSource
},
update: {
requestCount: {
increment: 1
}
},
where: {
dataSource_symbol: {
symbol, symbol,
currency: assetProfile.currency,
dataSource: assetProfile.dataSource dataSource: assetProfile.dataSource
},
update: {
requestCount: {
increment: 1
}
},
where: {
dataSource_symbol: {
symbol,
dataSource: assetProfile.dataSource
}
} }
} }
} );
); }
result = { result = {
...result, ...result,

Loading…
Cancel
Save