mirror of https://github.com/ghostfolio/ghostfolio
Browse Source
* Deprecate account and account balance endpoints in favor of accounts endpoints * Update changelogpull/8336/merge
committed by
GitHub
19 changed files with 295 additions and 51 deletions
@ -1,13 +0,0 @@ |
|||||
import { AccountBalanceModule as AccountBalanceServiceModule } from '@ghostfolio/api/services/account-balance/account-balance.module'; |
|
||||
import { AccountModule } from '@ghostfolio/api/services/account/account.module'; |
|
||||
import { ImpersonationModule } from '@ghostfolio/api/services/impersonation/impersonation.module'; |
|
||||
|
|
||||
import { Module } from '@nestjs/common'; |
|
||||
|
|
||||
import { AccountBalanceController } from './account-balance.controller'; |
|
||||
|
|
||||
@Module({ |
|
||||
controllers: [AccountBalanceController], |
|
||||
imports: [AccountBalanceServiceModule, AccountModule, ImpersonationModule] |
|
||||
}) |
|
||||
export class AccountBalanceModule {} |
|
||||
@ -0,0 +1,9 @@ |
|||||
|
import { IsUUID } from 'class-validator'; |
||||
|
|
||||
|
import { CreateAccountBalanceDto } from './create-account-balance.dto'; |
||||
|
|
||||
|
/** @deprecated */ |
||||
|
export class CreateAccountBalanceWithAccountIdDto extends CreateAccountBalanceDto { |
||||
|
@IsUUID() |
||||
|
accountId: string; |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
import type { AccountBalance } from '@ghostfolio/prisma/browser'; |
||||
|
|
||||
|
export interface AccountBalanceResponse extends Pick< |
||||
|
AccountBalance, |
||||
|
'accountId' | 'date' | 'id' | 'value' |
||||
|
> {} |
||||
@ -1,7 +1,7 @@ |
|||||
import type { AccountBalance } from '@ghostfolio/prisma/browser'; |
import type { AccountBalanceResponse } from './account-balance-response.interface'; |
||||
|
|
||||
export interface AccountBalancesResponse { |
export interface AccountBalancesResponse { |
||||
balances: (Pick<AccountBalance, 'accountId' | 'date' | 'id' | 'value'> & { |
balances: (AccountBalanceResponse & { |
||||
valueInBaseCurrency: number; |
valueInBaseCurrency: number; |
||||
})[]; |
})[]; |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue