|
@ -37,12 +37,12 @@ import { AccountBalanceService } from '@ghostfolio/api/services/account-balance/ |
|
|
@Controller('account') |
|
|
@Controller('account') |
|
|
export class AccountController { |
|
|
export class AccountController { |
|
|
public constructor( |
|
|
public constructor( |
|
|
private readonly accountService: AccountService, |
|
|
|
|
|
private readonly accountBalanceService: AccountBalanceService, |
|
|
private readonly accountBalanceService: AccountBalanceService, |
|
|
|
|
|
private readonly accountService: AccountService, |
|
|
private readonly impersonationService: ImpersonationService, |
|
|
private readonly impersonationService: ImpersonationService, |
|
|
private readonly portfolioService: PortfolioService, |
|
|
private readonly portfolioService: PortfolioService, |
|
|
@Inject(REQUEST) private readonly request: RequestWithUser |
|
|
@Inject(REQUEST) private readonly request: RequestWithUser |
|
|
) {} |
|
|
) { } |
|
|
|
|
|
|
|
|
@Delete(':id') |
|
|
@Delete(':id') |
|
|
@UseGuards(AuthGuard('jwt')) |
|
|
@UseGuards(AuthGuard('jwt')) |
|
@ -125,8 +125,10 @@ export class AccountController { |
|
|
public async getAccountBalancesById( |
|
|
public async getAccountBalancesById( |
|
|
@Param('id') id: string |
|
|
@Param('id') id: string |
|
|
): Promise<AccountBalances> { |
|
|
): Promise<AccountBalances> { |
|
|
|
|
|
return this.accountBalanceService.getAccountBalances({ |
|
|
return await this.accountBalanceService.getAccountBalances(id); |
|
|
accountId: id, |
|
|
|
|
|
userId: this.request.user.id |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Post() |
|
|
@Post() |
|
|