fix(server): bank accounts filter

This commit is contained in:
Ahmed Bouhuolia
2026-01-09 20:00:44 +02:00
parent 3f2ab6e8f0
commit 2186828516
9 changed files with 317 additions and 33 deletions

View File

@@ -1,16 +1,28 @@
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';
import { ApiOperation, ApiQuery, ApiResponse, ApiTags } from '@nestjs/swagger';
import { BankAccountsQueryDto } from './dtos/BankAccountsQuery.dto';
import { BankAccountResponseDto } from './dtos/BankAccountResponse.dto';
@Controller('banking/accounts')
@ApiTags('Bank Accounts')
export class BankAccountsController {
constructor(private bankAccountsApplication: BankAccountsApplication) {}
constructor(private bankAccountsApplication: BankAccountsApplication) { }
@Get()
@ApiOperation({ summary: 'Retrieve the bank accounts.' })
getBankAccounts(@Query() filterDto: ICashflowAccountsFilter) {
@ApiQuery({
name: 'query',
description: 'Query parameters for the bank accounts list.',
type: BankAccountsQueryDto,
required: false,
})
@ApiResponse({
status: 200,
description: 'List of bank accounts retrieved successfully.',
type: [BankAccountResponseDto],
})
getBankAccounts(@Query() filterDto: BankAccountsQueryDto) {
return this.bankAccountsApplication.getBankAccounts(filterDto);
}