mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
refactor(nestjs): hook up new endpoints
This commit is contained in:
@@ -4,9 +4,11 @@ import { CreateBankTransactionService } from './commands/CreateBankTransaction.s
|
||||
import { GetBankTransactionService } from './queries/GetBankTransaction.service';
|
||||
import {
|
||||
IBankAccountsFilter,
|
||||
ICashflowAccountTransactionsQuery,
|
||||
} from './types/BankingTransactions.types';
|
||||
import { GetBankAccountsService } from './queries/GetBankAccounts.service';
|
||||
import { CreateBankTransactionDto } from './dtos/CreateBankTransaction.dto';
|
||||
import { GetBankAccountTransactionsService } from './queries/GetBankAccountTransactions/GetBankAccountTransactions.service';
|
||||
|
||||
@Injectable()
|
||||
export class BankingTransactionsApplication {
|
||||
@@ -15,6 +17,7 @@ export class BankingTransactionsApplication {
|
||||
private readonly deleteTransactionService: DeleteCashflowTransaction,
|
||||
private readonly getCashflowTransactionService: GetBankTransactionService,
|
||||
private readonly getBankAccountsService: GetBankAccountsService,
|
||||
private readonly getBankAccountTransactionsService: GetBankAccountTransactionsService,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -37,6 +40,16 @@ export class BankingTransactionsApplication {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the bank transactions of the given bank id.
|
||||
* @param {ICashflowAccountTransactionsQuery} query
|
||||
*/
|
||||
public getBankAccountTransactions(query: ICashflowAccountTransactionsQuery) {
|
||||
return this.getBankAccountTransactionsService.bankAccountTransactions(
|
||||
query,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves specific cashflow transaction.
|
||||
* @param {number} cashflowTransactionId
|
||||
|
||||
Reference in New Issue
Block a user