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
})
.then(async (assetProfile) => {
await this.prismaService.dataProviderGhostfolioResolvedAssetProfile.upsert(
{
create: {
symbol,
currency: assetProfile.currency ?? '',
dataSource: assetProfile.dataSource
},
update: {
requestCount: {
increment: 1
}
},
where: {
dataSource_symbol: {
if (assetProfile) {
await this.prismaService.dataProviderGhostfolioResolvedAssetProfile.upsert(
{
create: {
symbol,
currency: assetProfile.currency,
dataSource: assetProfile.dataSource
},
update: {
requestCount: {
increment: 1
}
},
where: {
dataSource_symbol: {
symbol,
dataSource: assetProfile.dataSource
}
}
}
}
);
);
}
result = {
...result,

Loading…
Cancel
Save