16 lines
325 B
JavaScript
16 lines
325 B
JavaScript
|
|
const { getIO } = require('./socketIO')
|
|
|
|
function sendMessageSocket({ companyId, action, status, data }) {
|
|
|
|
// console.log(`*** ${msg} ***`)
|
|
|
|
const io = getIO()
|
|
io.to(`company_${companyId.toString()}`).emit("crm_upload", {
|
|
action,
|
|
status,
|
|
data
|
|
})
|
|
}
|
|
|
|
module.exports = sendMessageSocket |