Updated invoice route handler to reference 'toType' and 'fromType' fields, ensuring consistency with the latest schema adjustments.
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-06-21 21:30:09 +01:00
parent 99ef989cc5
commit e14c1405da

View File

@ -32,8 +32,8 @@ export const listInvoicesRouteHandler = async (
order = 'ascend' order = 'ascend'
) => { ) => {
const populateFields = [ const populateFields = [
{ path: 'to', strictPopulate: false, ref: 'client' }, { path: 'to', strictPopulate: false, ref: 'toType' },
{ path: 'from', strictPopulate: false, ref: 'vendor' }, { path: 'from', strictPopulate: false, ref: 'fromType' },
{ path: 'order' }, { path: 'order' },
]; ];
const result = await listObjects({ const result = await listObjects({