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) dm = await crud[channel].create(d.data)
recvUpdate(channel, dm) recvUpdate(channel, dm)
fanoutMsg(channel, await crud[channel].getAll()) fanoutMsg(channel, await crud[channel].getAll())
fanoutMsg(channel, await crud[channel].getAll())
break; break;
case 'update': case 'update':
dm = await crud[channel].update(d.data.id, d.data.data) dm = await crud[channel].update(d.data.id, d.data.data)
@ -77,10 +76,10 @@ const fanoutMsg = (channel, data) => {
data, data,
} }
connections[k].connection.send(JSON.stringify(d)) 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 = { const d = {
event: `streams:full`, event: 'streams:full',
data, data: await crud['streams'].getAllPop(),
} }
connections[k].connection.send(JSON.stringify(d)) connections[k].connection.send(JSON.stringify(d))
} }

Loading…
Cancel
Save