mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: listing vendors and customers.
feat: items service events.
This commit is contained in:
@@ -196,9 +196,15 @@ export default class VendorsController extends ContactsController {
|
||||
filterRoles: [],
|
||||
...this.matchedBodyData(req),
|
||||
};
|
||||
|
||||
try {
|
||||
const vendors = await this.vendorsService.getVendorsList(tenantId, vendorsFilter);
|
||||
return res.status(200).send({ vendors });
|
||||
const { vendors, pagination, filterMeta } = await this.vendorsService.getVendorsList(tenantId, vendorsFilter);
|
||||
|
||||
return res.status(200).send({
|
||||
vendors,
|
||||
pagination: this.transfromToResponse(pagination),
|
||||
filter_meta: this.transfromToResponse(filterMeta),
|
||||
});
|
||||
} catch (error) {
|
||||
next(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user