feature/IO-2924-Refactor-Production-Board-For-Sockets - Clear Stage
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -3,10 +3,7 @@ const { isObject } = require("lodash");
|
|||||||
const jobUpdated = async (req, res) => {
|
const jobUpdated = async (req, res) => {
|
||||||
const { io, logger } = req;
|
const { io, logger } = req;
|
||||||
|
|
||||||
logger.log("job-update", "INFO", req.user?.email, null, {
|
console.dir(req.body, { depth: null });
|
||||||
message: `Job updated event received from Hasura`,
|
|
||||||
body: req?.body
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!req?.body?.event?.data?.new || !isObject(req?.body?.event?.data?.new)) {
|
if (!req?.body?.event?.data?.new || !isObject(req?.body?.event?.data?.new)) {
|
||||||
logger.log("job-update-error", "ERROR", req.user?.email, null, {
|
logger.log("job-update-error", "ERROR", req.user?.email, null, {
|
||||||
@@ -20,6 +17,11 @@ const jobUpdated = async (req, res) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.log("job-update", "INFO", req.user?.email, null, {
|
||||||
|
message: `Job updated event received from Hasura`,
|
||||||
|
jobid: req?.body?.event?.data?.new?.id
|
||||||
|
});
|
||||||
|
|
||||||
const updatedJob = req.body.event.data.new;
|
const updatedJob = req.body.event.data.new;
|
||||||
const bodyshopID = updatedJob.shopid;
|
const bodyshopID = updatedJob.shopid;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user