cmd/pubsub: fix `pubsub ls` emiting plain strings instead of JSON
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
Jakub Sztandera committed
Mar 16, 2018 at 14:01 UTC
42d1aa5bf746ffed715d132f8776b46d11869c42
1 file changed
+2
-4
core/commands/pubsub.go
+2
-4
@@ -268,11 +268,9 @@ To use, the daemon must be run with '--enable-pubsub-experiment'.
268
return
269
}
270
271
- for _, topic := range n.Floodsub.GetTopics() {
272
- res.Emit(topic)
273
- }
271
+ cmds.EmitOnce(res, stringList{n.Floodsub.GetTopics()})
272
},
275
- Type: "",
273
+ Type: stringList{},
274
}
275
276
var PubsubPeersCmd = &cmds.Command{