|
|
@ -25,7 +25,7 @@ import { MarketDataPreset } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
|
import { Injectable, NotFoundException } from '@nestjs/common'; |
|
|
import { Injectable, NotFoundException } from '@nestjs/common'; |
|
|
import { AssetClass, AssetSubClass, DataSource, Prisma } from '@prisma/client'; |
|
|
import { AssetClass, AssetSubClass, DataSource, Prisma } from '@prisma/client'; |
|
|
import { groupBy, omit } from 'lodash'; |
|
|
import { groupBy } from 'lodash'; |
|
|
|
|
|
|
|
|
@Injectable() |
|
|
@Injectable() |
|
|
export class AssetProfilesService { |
|
|
export class AssetProfilesService { |
|
|
@ -118,6 +118,7 @@ export class AssetProfilesService { |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
marketData, |
|
|
marketData, |
|
|
|
|
|
splits, |
|
|
assetProfile: assetProfile ?? { |
|
|
assetProfile: assetProfile ?? { |
|
|
activitiesCount, |
|
|
activitiesCount, |
|
|
currency, |
|
|
currency, |
|
|
@ -127,10 +128,7 @@ export class AssetProfilesService { |
|
|
assetClass: isCurrencyAssetProfile ? AssetClass.LIQUIDITY : undefined, |
|
|
assetClass: isCurrencyAssetProfile ? AssetClass.LIQUIDITY : undefined, |
|
|
assetSubClass: isCurrencyAssetProfile ? AssetSubClass.CASH : undefined, |
|
|
assetSubClass: isCurrencyAssetProfile ? AssetSubClass.CASH : undefined, |
|
|
isActive: true |
|
|
isActive: true |
|
|
}, |
|
|
} |
|
|
splits: splits.map((split) => { |
|
|
|
|
|
return omit(split, 'symbolProfile'); |
|
|
|
|
|
}) |
|
|
|
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|