.
This commit is contained in:
parent
f5e0ac2cbe
commit
c66225c93d
@ -30,7 +30,14 @@ export function init(cfg, db) {
|
|||||||
db.subscribe(
|
db.subscribe(
|
||||||
message.subject,
|
message.subject,
|
||||||
message.filter
|
message.filter
|
||||||
).then(r => ws.send(r));
|
).then(r => ws.send(
|
||||||
|
JSON.stringify({
|
||||||
|
subject: message.subject,
|
||||||
|
field: message.field,
|
||||||
|
filter: message.filter,
|
||||||
|
value: r.map(v => v[message.field]),
|
||||||
|
})
|
||||||
|
));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw 'invalid action "' + message.action + '"';
|
throw 'invalid action "' + message.action + '"';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user