Workaround for message id
This commit is contained in:
parent
6cb78c657f
commit
7797eb9210
@ -31,7 +31,9 @@ async function run() {
|
||||
console.log("Started watching changes in database");
|
||||
|
||||
const writeMessage = (response, blob) => {
|
||||
const message = `id: ${blob._id}\nevent: message\ndata: ${JSON.stringify(blob)}\n\n`
|
||||
// TODO: why no id?
|
||||
const id = blob._id || null
|
||||
const message = `id: ${id}\nevent: message\ndata: ${JSON.stringify(blob)}\n\n`
|
||||
response.write(message)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user