feature/IO-3096-GlobalNotifications - Check-point
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
const handleJobsChange = (req, res) => {
|
||||
return res.status(200).json({ message: "Jobs change handled." });
|
||||
};
|
||||
const scenarioParser = require("../utils/scenarioParser");
|
||||
|
||||
const handleJobsChange = async (req, res) => {
|
||||
const { logger } = req;
|
||||
scenarioParser(req, `req.body.event.new.id`).catch((e) =>
|
||||
logger.log("notifications-error", "error", "notifications", null, { error: e?.message })
|
||||
);
|
||||
return res.status(200).json({ message: "Job Notifications Event Handled." });
|
||||
};
|
||||
//
|
||||
module.exports = handleJobsChange;
|
||||
|
||||
@@ -2,8 +2,10 @@ const scenarioParser = require("../utils/scenarioParser");
|
||||
|
||||
const handleTasksChange = async (req, res) => {
|
||||
const { logger } = req;
|
||||
scenarioParser(req).catch((e) => logger.log("notifications-error", "error", "jsr", null, { error: e?.message }));
|
||||
return res.status(200).json({ message: "Notification Scenario Event Handled." });
|
||||
scenarioParser(req, "req.body.event.new.jobid").catch((e) =>
|
||||
logger.log("notifications-error", "error", "notifications", null, { error: e?.message })
|
||||
);
|
||||
return res.status(200).json({ message: "Tasks Notifications Event Handled." });
|
||||
};
|
||||
//
|
||||
module.exports = handleTasksChange;
|
||||
|
||||
Reference in New Issue
Block a user