IO-2924-Refactor-Production-board-to-use-Socket-Provider: Finalize
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -11,7 +11,10 @@ require("dotenv").config({
|
||||
|
||||
exports.default = async (req, res) => {
|
||||
const { useremail, bodyshopid, operationName, variables, env, time, dbevent, user } = req.body;
|
||||
const { ioRedis } = req;
|
||||
const {
|
||||
ioRedis,
|
||||
ioHelpers: { getBodyshopRoom }
|
||||
} = req;
|
||||
try {
|
||||
await client.request(queries.INSERT_IOEVENT, {
|
||||
event: {
|
||||
@@ -24,8 +27,7 @@ exports.default = async (req, res) => {
|
||||
useremail
|
||||
}
|
||||
});
|
||||
|
||||
ioRedis.to(bodyshopid).emit("bodyshop-message", {
|
||||
ioRedis.to(getBodyshopRoom(bodyshopid)).emit("bodyshop-message", {
|
||||
operationName,
|
||||
useremail
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user