mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
refactoring: custom views service.
fix: constraints of delete item from storage. fix: constraints of delete item category from storage. fix: localize database seeds files. fix: view meta data in accounts list response.
This commit is contained in:
@@ -381,6 +381,20 @@ export default class BillsPayments extends BaseController {
|
||||
* @return {Response}
|
||||
*/
|
||||
async getBillsPayments(req: Request, res: Response) {
|
||||
const { tenantId } = req.params;
|
||||
const billPaymentsFilter = this.matchedQueryData(req);
|
||||
|
||||
try {
|
||||
const { billPayments, pagination, filterMeta } = await this.billPaymentService
|
||||
.listBillPayments(tenantId, billPaymentsFilter);
|
||||
|
||||
return res.status(200).send({
|
||||
bill_payments: billPayments,
|
||||
pagination: this.transfromToResponse(pagination),
|
||||
filter_meta: this.transfromToResponse(filterMeta)
|
||||
});
|
||||
} catch (error) {
|
||||
next(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user