mirror of https://github.com/ghostfolio/ghostfolio
committed by
GitHub
409 changed files with 36647 additions and 31302 deletions
@ -1,8 +1,8 @@ |
|||
{ |
|||
"recommendations": [ |
|||
"angular.ng-template", |
|||
"esbenp.prettier-vscode", |
|||
"firsttris.vscode-jest-runner", |
|||
"nrwl.angular-console" |
|||
"nrwl.angular-console", |
|||
"prettier.prettier-vscode" |
|||
] |
|||
} |
|||
|
|||
@ -1,4 +1,4 @@ |
|||
{ |
|||
"editor.defaultFormatter": "esbenp.prettier-vscode", |
|||
"editor.defaultFormatter": "prettier.prettier-vscode", |
|||
"editor.formatOnSave": true |
|||
} |
|||
|
|||
@ -0,0 +1,114 @@ |
|||
import ms from 'ms'; |
|||
|
|||
/** |
|||
* Custom state store for OIDC authentication that doesn't rely on express-session. |
|||
* This store manages OAuth2 state parameters in memory with automatic cleanup. |
|||
*/ |
|||
export class OidcStateStore { |
|||
private readonly STATE_EXPIRY_MS = ms('10 minutes'); |
|||
|
|||
private stateMap = new Map< |
|||
string, |
|||
{ |
|||
appState?: unknown; |
|||
ctx: { issued?: Date; maxAge?: number; nonce?: string }; |
|||
meta?: unknown; |
|||
timestamp: number; |
|||
} |
|||
>(); |
|||
|
|||
/** |
|||
* Store request state. |
|||
* Signature matches passport-openidconnect SessionStore |
|||
*/ |
|||
public store( |
|||
_req: unknown, |
|||
_meta: unknown, |
|||
appState: unknown, |
|||
ctx: { maxAge?: number; nonce?: string; issued?: Date }, |
|||
callback: (err: Error | null, handle?: string) => void |
|||
) { |
|||
try { |
|||
// Generate a unique handle for this state
|
|||
const handle = this.generateHandle(); |
|||
|
|||
this.stateMap.set(handle, { |
|||
appState, |
|||
ctx, |
|||
meta: _meta, |
|||
timestamp: Date.now() |
|||
}); |
|||
|
|||
// Clean up expired states
|
|||
this.cleanup(); |
|||
|
|||
callback(null, handle); |
|||
} catch (error) { |
|||
callback(error as Error); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Verify request state. |
|||
* Signature matches passport-openidconnect SessionStore |
|||
*/ |
|||
public verify( |
|||
_req: unknown, |
|||
handle: string, |
|||
callback: ( |
|||
err: Error | null, |
|||
appState?: unknown, |
|||
ctx?: { maxAge?: number; nonce?: string; issued?: Date } |
|||
) => void |
|||
) { |
|||
try { |
|||
const data = this.stateMap.get(handle); |
|||
|
|||
if (!data) { |
|||
return callback(null, undefined, undefined); |
|||
} |
|||
|
|||
if (Date.now() - data.timestamp > this.STATE_EXPIRY_MS) { |
|||
// State has expired
|
|||
this.stateMap.delete(handle); |
|||
return callback(null, undefined, undefined); |
|||
} |
|||
|
|||
// Remove state after verification (one-time use)
|
|||
this.stateMap.delete(handle); |
|||
|
|||
callback(null, data.ctx, data.appState); |
|||
} catch (error) { |
|||
callback(error as Error); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Clean up expired states |
|||
*/ |
|||
private cleanup() { |
|||
const now = Date.now(); |
|||
const expiredKeys: string[] = []; |
|||
|
|||
for (const [key, value] of this.stateMap.entries()) { |
|||
if (now - value.timestamp > this.STATE_EXPIRY_MS) { |
|||
expiredKeys.push(key); |
|||
} |
|||
} |
|||
|
|||
for (const key of expiredKeys) { |
|||
this.stateMap.delete(key); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Generate a cryptographically secure random handle |
|||
*/ |
|||
private generateHandle() { |
|||
return ( |
|||
Math.random().toString(36).substring(2, 15) + |
|||
Math.random().toString(36).substring(2, 15) + |
|||
Date.now().toString(36) |
|||
); |
|||
} |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
import { Injectable, Logger } from '@nestjs/common'; |
|||
import { PassportStrategy } from '@nestjs/passport'; |
|||
import { Provider } from '@prisma/client'; |
|||
import { Request } from 'express'; |
|||
import { Strategy, type StrategyOptions } from 'passport-openidconnect'; |
|||
|
|||
import { AuthService } from './auth.service'; |
|||
import { |
|||
OidcContext, |
|||
OidcIdToken, |
|||
OidcParams, |
|||
OidcProfile |
|||
} from './interfaces/interfaces'; |
|||
import { OidcStateStore } from './oidc-state.store'; |
|||
|
|||
@Injectable() |
|||
export class OidcStrategy extends PassportStrategy(Strategy, 'oidc') { |
|||
private static readonly stateStore = new OidcStateStore(); |
|||
|
|||
public constructor( |
|||
private readonly authService: AuthService, |
|||
options: StrategyOptions |
|||
) { |
|||
super({ |
|||
...options, |
|||
passReqToCallback: true, |
|||
store: OidcStrategy.stateStore |
|||
}); |
|||
} |
|||
|
|||
public async validate( |
|||
_request: Request, |
|||
issuer: string, |
|||
profile: OidcProfile, |
|||
context: OidcContext, |
|||
idToken: OidcIdToken, |
|||
_accessToken: string, |
|||
_refreshToken: string, |
|||
params: OidcParams |
|||
) { |
|||
try { |
|||
const thirdPartyId = |
|||
profile?.id ?? |
|||
profile?.sub ?? |
|||
idToken?.sub ?? |
|||
params?.sub ?? |
|||
context?.claims?.sub; |
|||
|
|||
const jwt = await this.authService.validateOAuthLogin({ |
|||
thirdPartyId, |
|||
provider: Provider.OIDC |
|||
}); |
|||
|
|||
if (!thirdPartyId) { |
|||
Logger.error( |
|||
`Missing subject identifier in OIDC response from ${issuer}`, |
|||
'OidcStrategy' |
|||
); |
|||
|
|||
throw new Error('Missing subject identifier in OIDC response'); |
|||
} |
|||
|
|||
return { jwt }; |
|||
} catch (error) { |
|||
Logger.error(error, 'OidcStrategy'); |
|||
throw error; |
|||
} |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
import { Type } from 'class-transformer'; |
|||
import { |
|||
ArrayNotEmpty, |
|||
IsArray, |
|||
IsISO8601, |
|||
IsNumber, |
|||
IsOptional |
|||
} from 'class-validator'; |
|||
|
|||
export class UpdateBulkMarketDataDto { |
|||
@ArrayNotEmpty() |
|||
@IsArray() |
|||
@Type(() => UpdateMarketDataDto) |
|||
marketData: UpdateMarketDataDto[]; |
|||
} |
|||
|
|||
class UpdateMarketDataDto { |
|||
@IsISO8601() |
|||
@IsOptional() |
|||
date?: string; |
|||
|
|||
@IsNumber() |
|||
marketPrice: number; |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
import { PlatformService } from '@ghostfolio/api/app/platform/platform.service'; |
|||
import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorator'; |
|||
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; |
|||
import { PlatformsResponse } from '@ghostfolio/common/interfaces'; |
|||
import { permissions } from '@ghostfolio/common/permissions'; |
|||
|
|||
import { Controller, Get, UseGuards } from '@nestjs/common'; |
|||
import { AuthGuard } from '@nestjs/passport'; |
|||
|
|||
@Controller('platforms') |
|||
export class PlatformsController { |
|||
public constructor(private readonly platformService: PlatformService) {} |
|||
|
|||
@Get() |
|||
@HasPermission(permissions.readPlatforms) |
|||
@UseGuards(AuthGuard('jwt'), HasPermissionGuard) |
|||
public async getPlatforms(): Promise<PlatformsResponse> { |
|||
const platforms = await this.platformService.getPlatforms(); |
|||
|
|||
return { platforms }; |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
import { PlatformModule } from '@ghostfolio/api/app/platform/platform.module'; |
|||
|
|||
import { Module } from '@nestjs/common'; |
|||
|
|||
import { PlatformsController } from './platforms.controller'; |
|||
|
|||
@Module({ |
|||
controllers: [PlatformsController], |
|||
imports: [PlatformModule] |
|||
}) |
|||
export class PlatformsModule {} |
|||
@ -0,0 +1,290 @@ |
|||
import { AccountBalanceService } from '@ghostfolio/api/app/account-balance/account-balance.service'; |
|||
import { AccountService } from '@ghostfolio/api/app/account/account.service'; |
|||
import { OrderService } from '@ghostfolio/api/app/order/order.service'; |
|||
import { userDummyData } from '@ghostfolio/api/app/portfolio/calculator/portfolio-calculator-test-utils'; |
|||
import { PortfolioCalculatorFactory } from '@ghostfolio/api/app/portfolio/calculator/portfolio-calculator.factory'; |
|||
import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service'; |
|||
import { CurrentRateServiceMock } from '@ghostfolio/api/app/portfolio/current-rate.service.mock'; |
|||
import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.service'; |
|||
import { RedisCacheServiceMock } from '@ghostfolio/api/app/redis-cache/redis-cache.service.mock'; |
|||
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|||
import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; |
|||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|||
import { ExchangeRateDataServiceMock } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service.mock'; |
|||
import { PortfolioSnapshotService } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service'; |
|||
import { PortfolioSnapshotServiceMock } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service.mock'; |
|||
import { parseDate } from '@ghostfolio/common/helper'; |
|||
import { TimelinePosition } from '@ghostfolio/common/models'; |
|||
import { PerformanceCalculationType } from '@ghostfolio/common/types/performance-calculation-type.type'; |
|||
|
|||
import { DataSource } from '@prisma/client'; |
|||
import { Big } from 'big.js'; |
|||
import { randomUUID } from 'node:crypto'; |
|||
|
|||
jest.mock('@ghostfolio/api/app/portfolio/current-rate.service', () => { |
|||
return { |
|||
CurrentRateService: jest.fn().mockImplementation(() => { |
|||
return CurrentRateServiceMock; |
|||
}) |
|||
}; |
|||
}); |
|||
|
|||
jest.mock( |
|||
'@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service', |
|||
() => { |
|||
return { |
|||
ExchangeRateDataService: jest.fn().mockImplementation(() => { |
|||
return ExchangeRateDataServiceMock; |
|||
}) |
|||
}; |
|||
} |
|||
); |
|||
|
|||
jest.mock( |
|||
'@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service', |
|||
() => { |
|||
return { |
|||
PortfolioSnapshotService: jest.fn().mockImplementation(() => { |
|||
return PortfolioSnapshotServiceMock; |
|||
}) |
|||
}; |
|||
} |
|||
); |
|||
|
|||
jest.mock('@ghostfolio/api/app/redis-cache/redis-cache.service', () => { |
|||
return { |
|||
RedisCacheService: jest.fn().mockImplementation(() => { |
|||
return RedisCacheServiceMock; |
|||
}) |
|||
}; |
|||
}); |
|||
|
|||
describe('PortfolioCalculator', () => { |
|||
let accountBalanceService: AccountBalanceService; |
|||
let accountService: AccountService; |
|||
let configurationService: ConfigurationService; |
|||
let currentRateService: CurrentRateService; |
|||
let dataProviderService: DataProviderService; |
|||
let exchangeRateDataService: ExchangeRateDataService; |
|||
let orderService: OrderService; |
|||
let portfolioCalculatorFactory: PortfolioCalculatorFactory; |
|||
let portfolioSnapshotService: PortfolioSnapshotService; |
|||
let redisCacheService: RedisCacheService; |
|||
|
|||
beforeEach(() => { |
|||
configurationService = new ConfigurationService(); |
|||
|
|||
exchangeRateDataService = new ExchangeRateDataService( |
|||
null, |
|||
null, |
|||
null, |
|||
null |
|||
); |
|||
|
|||
accountBalanceService = new AccountBalanceService( |
|||
null, |
|||
exchangeRateDataService, |
|||
null |
|||
); |
|||
|
|||
accountService = new AccountService( |
|||
accountBalanceService, |
|||
null, |
|||
exchangeRateDataService, |
|||
null |
|||
); |
|||
|
|||
redisCacheService = new RedisCacheService(null, configurationService); |
|||
|
|||
dataProviderService = new DataProviderService( |
|||
configurationService, |
|||
null, |
|||
null, |
|||
null, |
|||
null, |
|||
redisCacheService |
|||
); |
|||
|
|||
currentRateService = new CurrentRateService( |
|||
dataProviderService, |
|||
null, |
|||
null, |
|||
null |
|||
); |
|||
|
|||
orderService = new OrderService( |
|||
accountBalanceService, |
|||
accountService, |
|||
null, |
|||
dataProviderService, |
|||
null, |
|||
exchangeRateDataService, |
|||
null, |
|||
null |
|||
); |
|||
|
|||
portfolioSnapshotService = new PortfolioSnapshotService(null); |
|||
|
|||
portfolioCalculatorFactory = new PortfolioCalculatorFactory( |
|||
configurationService, |
|||
currentRateService, |
|||
exchangeRateDataService, |
|||
portfolioSnapshotService, |
|||
redisCacheService |
|||
); |
|||
}); |
|||
|
|||
describe('Cash Performance', () => { |
|||
it('should calculate performance for cash assets in CHF default currency', async () => { |
|||
jest.useFakeTimers().setSystemTime(parseDate('2025-01-01').getTime()); |
|||
|
|||
const accountId = randomUUID(); |
|||
|
|||
jest |
|||
.spyOn(accountBalanceService, 'getAccountBalances') |
|||
.mockResolvedValue({ |
|||
balances: [ |
|||
{ |
|||
accountId, |
|||
id: randomUUID(), |
|||
date: parseDate('2023-12-31'), |
|||
value: 1000, |
|||
valueInBaseCurrency: 850 |
|||
}, |
|||
{ |
|||
accountId, |
|||
id: randomUUID(), |
|||
date: parseDate('2024-12-31'), |
|||
value: 2000, |
|||
valueInBaseCurrency: 1800 |
|||
} |
|||
] |
|||
}); |
|||
|
|||
jest.spyOn(accountService, 'getCashDetails').mockResolvedValue({ |
|||
accounts: [ |
|||
{ |
|||
balance: 2000, |
|||
comment: null, |
|||
createdAt: parseDate('2023-12-31'), |
|||
currency: 'USD', |
|||
id: accountId, |
|||
isExcluded: false, |
|||
name: 'USD', |
|||
platformId: null, |
|||
updatedAt: parseDate('2023-12-31'), |
|||
userId: userDummyData.id |
|||
} |
|||
], |
|||
balanceInBaseCurrency: 1820 |
|||
}); |
|||
|
|||
jest |
|||
.spyOn(dataProviderService, 'getDataSourceForExchangeRates') |
|||
.mockReturnValue(DataSource.YAHOO); |
|||
|
|||
jest.spyOn(orderService, 'getOrders').mockResolvedValue({ |
|||
activities: [], |
|||
count: 0 |
|||
}); |
|||
|
|||
const { activities } = await orderService.getOrdersForPortfolioCalculator( |
|||
{ |
|||
userCurrency: 'CHF', |
|||
userId: userDummyData.id, |
|||
withCash: true |
|||
} |
|||
); |
|||
|
|||
jest.spyOn(currentRateService, 'getValues').mockResolvedValue({ |
|||
dataProviderInfos: [], |
|||
errors: [], |
|||
values: [] |
|||
}); |
|||
|
|||
const accountBalanceItems = |
|||
await accountBalanceService.getAccountBalanceItems({ |
|||
userCurrency: 'CHF', |
|||
userId: userDummyData.id |
|||
}); |
|||
|
|||
const portfolioCalculator = portfolioCalculatorFactory.createCalculator({ |
|||
accountBalanceItems, |
|||
activities, |
|||
calculationType: PerformanceCalculationType.ROAI, |
|||
currency: 'CHF', |
|||
userId: userDummyData.id |
|||
}); |
|||
|
|||
const portfolioSnapshot = await portfolioCalculator.computeSnapshot(); |
|||
|
|||
const position = portfolioSnapshot.positions.find(({ symbol }) => { |
|||
return symbol === 'USD'; |
|||
}); |
|||
|
|||
/** |
|||
* Investment: 2000 USD * 0.91 = 1820 CHF |
|||
* Investment value with currency effect: (1000 USD * 0.85) + (1000 USD * 0.90) = 1750 CHF |
|||
* Net performance: (1000 USD * 1.0) - (1000 USD * 1.0) = 0 CHF |
|||
* Total account balance: 2000 USD * 0.85 = 1700 CHF (using the exchange rate on 2024-12-31) |
|||
* Value in base currency: 2000 USD * 0.91 = 1820 CHF |
|||
*/ |
|||
expect(position).toMatchObject<TimelinePosition>({ |
|||
averagePrice: new Big(1), |
|||
currency: 'USD', |
|||
dataSource: DataSource.YAHOO, |
|||
dividend: new Big(0), |
|||
dividendInBaseCurrency: new Big(0), |
|||
fee: new Big(0), |
|||
feeInBaseCurrency: new Big(0), |
|||
firstBuyDate: '2023-12-31', |
|||
grossPerformance: new Big(0), |
|||
grossPerformancePercentage: new Big(0), |
|||
grossPerformancePercentageWithCurrencyEffect: new Big( |
|||
'0.08211603004634809014' |
|||
), |
|||
grossPerformanceWithCurrencyEffect: new Big(70), |
|||
includeInTotalAssetValue: false, |
|||
investment: new Big(1820), |
|||
investmentWithCurrencyEffect: new Big(1750), |
|||
marketPrice: null, |
|||
marketPriceInBaseCurrency: 0.91, |
|||
netPerformance: new Big(0), |
|||
netPerformancePercentage: new Big(0), |
|||
netPerformancePercentageWithCurrencyEffectMap: { |
|||
'1d': new Big('0.01111111111111111111'), |
|||
'1y': new Big('0.06937181021989792704'), |
|||
'5y': new Big('0.0818817546090273363'), |
|||
max: new Big('0.0818817546090273363'), |
|||
mtd: new Big('0.01111111111111111111'), |
|||
wtd: new Big('-0.05517241379310344828'), |
|||
ytd: new Big('0.01111111111111111111') |
|||
}, |
|||
netPerformanceWithCurrencyEffectMap: { |
|||
'1d': new Big(20), |
|||
'1y': new Big(60), |
|||
'5y': new Big(70), |
|||
max: new Big(70), |
|||
mtd: new Big(20), |
|||
wtd: new Big(-80), |
|||
ytd: new Big(20) |
|||
}, |
|||
quantity: new Big(2000), |
|||
symbol: 'USD', |
|||
timeWeightedInvestment: new Big('912.47956403269754768392'), |
|||
timeWeightedInvestmentWithCurrencyEffect: new Big( |
|||
'852.45231607629427792916' |
|||
), |
|||
transactionCount: 2, |
|||
valueInBaseCurrency: new Big(1820) |
|||
}); |
|||
|
|||
expect(portfolioSnapshot).toMatchObject({ |
|||
hasErrors: false, |
|||
totalFeesWithCurrencyEffect: new Big(0), |
|||
totalInterestWithCurrencyEffect: new Big(0), |
|||
totalLiabilitiesWithCurrencyEffect: new Big(0) |
|||
}); |
|||
}); |
|||
}); |
|||
}); |
|||
File diff suppressed because it is too large
@ -0,0 +1,11 @@ |
|||
import { AssetProfileIdentifier } from '@ghostfolio/common/interfaces'; |
|||
|
|||
export class AssetProfileChangedEvent { |
|||
public constructor( |
|||
public readonly data: AssetProfileIdentifier & { currency: string } |
|||
) {} |
|||
|
|||
public static getName(): string { |
|||
return 'assetProfile.changed'; |
|||
} |
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
import { OrderService } from '@ghostfolio/api/app/order/order.service'; |
|||
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|||
import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; |
|||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|||
import { DataGatheringService } from '@ghostfolio/api/services/queues/data-gathering/data-gathering.service'; |
|||
import { DEFAULT_CURRENCY } from '@ghostfolio/common/config'; |
|||
|
|||
import { Injectable, Logger } from '@nestjs/common'; |
|||
import { OnEvent } from '@nestjs/event-emitter'; |
|||
|
|||
import { AssetProfileChangedEvent } from './asset-profile-changed.event'; |
|||
|
|||
@Injectable() |
|||
export class AssetProfileChangedListener { |
|||
public constructor( |
|||
private readonly configurationService: ConfigurationService, |
|||
private readonly dataGatheringService: DataGatheringService, |
|||
private readonly dataProviderService: DataProviderService, |
|||
private readonly exchangeRateDataService: ExchangeRateDataService, |
|||
private readonly orderService: OrderService |
|||
) {} |
|||
|
|||
@OnEvent(AssetProfileChangedEvent.getName()) |
|||
public async handleAssetProfileChanged(event: AssetProfileChangedEvent) { |
|||
Logger.log( |
|||
`Asset profile of ${event.data.symbol} (${event.data.dataSource}) has changed`, |
|||
'AssetProfileChangedListener' |
|||
); |
|||
|
|||
if ( |
|||
this.configurationService.get( |
|||
'ENABLE_FEATURE_GATHER_NEW_EXCHANGE_RATES' |
|||
) === false || |
|||
event.data.currency === DEFAULT_CURRENCY |
|||
) { |
|||
return; |
|||
} |
|||
|
|||
const existingCurrencies = this.exchangeRateDataService.getCurrencies(); |
|||
|
|||
if (!existingCurrencies.includes(event.data.currency)) { |
|||
Logger.log( |
|||
`New currency ${event.data.currency} has been detected`, |
|||
'AssetProfileChangedListener' |
|||
); |
|||
|
|||
await this.exchangeRateDataService.initialize(); |
|||
} |
|||
|
|||
const { dateOfFirstActivity } = |
|||
await this.orderService.getStatisticsByCurrency(event.data.currency); |
|||
|
|||
if (dateOfFirstActivity) { |
|||
await this.dataGatheringService.gatherSymbol({ |
|||
dataSource: this.dataProviderService.getDataSourceForExchangeRates(), |
|||
date: dateOfFirstActivity, |
|||
symbol: `${DEFAULT_CURRENCY}${event.data.currency}` |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,11 +1,24 @@ |
|||
import { OrderModule } from '@ghostfolio/api/app/order/order.module'; |
|||
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
|||
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|||
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
|||
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; |
|||
import { DataGatheringModule } from '@ghostfolio/api/services/queues/data-gathering/data-gathering.module'; |
|||
|
|||
import { Module } from '@nestjs/common'; |
|||
|
|||
import { AssetProfileChangedListener } from './asset-profile-changed.listener'; |
|||
import { PortfolioChangedListener } from './portfolio-changed.listener'; |
|||
|
|||
@Module({ |
|||
imports: [RedisCacheModule], |
|||
providers: [PortfolioChangedListener] |
|||
imports: [ |
|||
ConfigurationModule, |
|||
DataGatheringModule, |
|||
DataProviderModule, |
|||
ExchangeRateDataModule, |
|||
OrderModule, |
|||
RedisCacheModule |
|||
], |
|||
providers: [AssetProfileChangedListener, PortfolioChangedListener] |
|||
}) |
|||
export class EventsModule {} |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue