fix(proposals): id -> proposal_id onProposalRejected + fix(loads): Adding driver details on find endpoint

This commit is contained in:
Josepablo C
2025-04-08 22:20:01 -06:00
parent 1d3c9bd443
commit d01859db70
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ const CompanyModel = getModel('companies');
const ProposalsModel = getModel('proposals'); const ProposalsModel = getModel('proposals');
const branchesModel = getModel('branches'); const branchesModel = getModel('branches');
const populate_list = ['product', 'company', 'carrier', 'vehicle', 'categories','shipper_warehouse']; const populate_list = ['product', 'company', 'carrier', 'vehicle', 'categories','shipper_warehouse','driver'];
const generic = new GenericHandler( Model, null, populate_list ); const generic = new GenericHandler( Model, null, populate_list );
function getAndFilterList( query ){ function getAndFilterList( query ){

View File

@@ -39,7 +39,7 @@ async function onProposalRejected( proposal_id ){
/// Update Proposal: /// Update Proposal:
/// Remove shipper /// Remove shipper
await proposalsModel.findByIdAndUpdate( id , { await proposalsModel.findByIdAndUpdate( proposal_id , {
shipper : null shipper : null
} ); } );