refactor(nestjs): hook up new endpoints

This commit is contained in:
Ahmed Bouhuolia
2025-05-16 01:41:11 +02:00
parent ecb80b2cf2
commit 4de1ef71ca
23 changed files with 644 additions and 38 deletions

View File

@@ -1,12 +1,25 @@
import { Controller, Param, Post } from '@nestjs/common';
import { Controller, Get, Param, Post, Query } from '@nestjs/common';
import { BankAccountsApplication } from './BankAccountsApplication.service';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { ICashflowAccountsFilter } from './types/BankAccounts.types';
@Controller('banking/accounts')
@ApiTags('banking-accounts')
export class BankAccountsController {
constructor(private bankAccountsApplication: BankAccountsApplication) {}
@Get()
@ApiOperation({ summary: 'Retrieve the bank accounts.' })
getBankAccounts(@Query() filterDto: ICashflowAccountsFilter) {
return this.bankAccountsApplication.getBankAccounts(filterDto);
}
@Get(':bankAccountId/summary')
@ApiOperation({ summary: 'Retrieve the bank account summary.' })
getBankAccountSummary(@Param('bankAccountId') bankAccountId: number) {
return this.bankAccountsApplication.getBankAccountSumnmary(bankAccountId);
}
@Post(':id/disconnect')
@ApiOperation({
summary: 'Disconnect the bank connection of the given bank account.',