feat: excluded bank transactions

This commit is contained in:
Ahmed Bouhuolia
2024-06-27 22:14:53 +02:00
parent fab22c9820
commit 978ce6c441
28 changed files with 1301 additions and 27 deletions

View File

@@ -14,14 +14,11 @@ export class RecognizedTransactionsController extends BaseController {
router() {
const router = Router();
router.get(
'/accounts/:accountId',
this.getRecognizedTransactions.bind(this)
);
router.get('/', this.getRecognizedTransactions.bind(this));
return router;
}
k;
/**
* Retrieves the recognized bank transactions.
* @param {Request} req
@@ -34,15 +31,15 @@ export class RecognizedTransactionsController extends BaseController {
res: Response,
next: NextFunction
) {
const { accountId } = req.params;
const filter = this.matchedQueryData(req);
const { tenantId } = req;
try {
const data = await this.cashflowApplication.getRecognizedTransactions(
tenantId,
accountId
filter
);
return res.status(200).send({ data });
return res.status(200).send(data);
} catch (error) {
next(error);
}