feat: validate the matched linked transacation on deleting.

This commit is contained in:
Ahmed Bouhuolia
2024-06-23 14:34:40 +02:00
parent ca403872b3
commit 589b29bbdd
18 changed files with 307 additions and 20 deletions

View File

@@ -23,11 +23,9 @@ export class BankTransactionsMatchingController extends BaseController {
'/:transactionId',
[
param('transactionId').exists(),
body('matchedTransactions').isArray({ min: 1 }),
body('matchedTransactions.*.reference_type').exists(),
body('matchedTransactions.*.reference_id').isNumeric().toInt(),
body('matchedTransactions.*.amount').exists().isNumeric().toFloat(),
],
this.validationResult,
this.matchBankTransaction.bind(this)