19 lines
682 B
TypeScript
19 lines
682 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { ApiBearerAuth, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
|
|
import { BrokerAccountsEnvelopeDto } from './dto/broker-envelope.dto';
|
|
import { BrokerAccountsService } from './services/broker-accounts.service';
|
|
|
|
@ApiTags('Broker')
|
|
@ApiBearerAuth()
|
|
@Controller('broker')
|
|
export class TBankController {
|
|
constructor(private readonly brokerAccountsService: BrokerAccountsService) {}
|
|
|
|
@Get('accounts')
|
|
@ApiOperation({ summary: 'Get open T-Bank brokerage and IIS accounts' })
|
|
@ApiOkResponse({ type: BrokerAccountsEnvelopeDto })
|
|
async getAccounts() {
|
|
return this.brokerAccountsService.findAll();
|
|
}
|
|
}
|