Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
update(riskassessment):add consumer to create risk assessment
Browse files Browse the repository at this point in the history
  • Loading branch information
Wlkr123 committed Oct 17, 2023
1 parent 595dad9 commit a41a5e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/plugin-riskassessment-api/src/messageBroker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ export const initBroker = async cl => {
};
}
);

consumeRPCQueue(
'riskassessment:riskAssessments.create',
async ({ subdomain, data }) => {
const models = await generateModels(subdomain);

return {
data: await models.RiskAssessments.addRiskAssessment(data),
status: 'success'
};
}
);
};

export const sendFormsMessage = async (
Expand Down

0 comments on commit a41a5e0

Please sign in to comment.