.
This commit is contained in:
parent
f5e0ac2cbe
commit
c66225c93d
@ -30,7 +30,14 @@ export function init(cfg, db) {
|
||||
db.subscribe(
|
||||
message.subject,
|
||||
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;
|
||||
default:
|
||||
throw 'invalid action "' + message.action + '"';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user