fix(proposal events): Add userId to update accepted_by and reorder event to update all objects in time
feat(loads/public-load-tracking): add missing data to load objects
This commit is contained in:
@@ -18,7 +18,7 @@ const notificationsModel = getModel('notifications');
|
||||
*/
|
||||
async function onPostEvent( userId, proposalId ,newProposalData ){
|
||||
/// When a post event happens it is assumed that a proposal is created
|
||||
ProposalsEvents.onProposalCreate( userId, proposalId );
|
||||
await ProposalsEvents.onProposalCreate( userId, proposalId );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,9 +30,9 @@ async function onPostEvent( userId, proposalId ,newProposalData ){
|
||||
*/
|
||||
async function onPatchEvent( userId, proposalId , newProposalData ){
|
||||
if( !newProposalData.is_accepted ){
|
||||
ProposalsEvents.onProposalRejected( userId, proposalId );
|
||||
await ProposalsEvents.onProposalRejected( userId, proposalId );
|
||||
}else{
|
||||
ProposalsEvents.onProposalAccepted( userId, proposalId );
|
||||
await ProposalsEvents.onProposalAccepted( userId, proposalId );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user