Ayush Mukherjee 4 years ago
parent 496a0b9fff
commit 487f97e7e5

@ -50,7 +50,6 @@ const handleMsg = async (msg, id) => {
dm = await crud[channel].create(d.data)
recvUpdate(channel, dm)
fanoutMsg(channel, await crud[channel].getAll())
fanoutMsg(channel, await crud[channel].getAll())
break;
case 'update':
dm = await crud[channel].update(d.data.id, d.data.data)
@ -77,10 +76,10 @@ const fanoutMsg = (channel, data) => {
data,
}
connections[k].connection.send(JSON.stringify(d))
} else if (connections[k].events.indexOf(`streams:full`) !== -1) {
} else if (connections[k].events.indexOf('streams:full') !== -1) {
const d = {
event: `streams:full`,
data,
event: 'streams:full',
data: await crud['streams'].getAllPop(),
}
connections[k].connection.send(JSON.stringify(d))
}

Loading…
Cancel
Save