Add peer nickname to JSON output

This commit is contained in:
Bryan Boreham committed 2015-03-19 11:34:01 +00:00
1 parent 6b64516ede
commit 3fbb6eaa8d
1 file changed
+2 -1
+2 -1
View File
@@ -63,10 +63,11 @@ func (routes *Routes) MarshalJSON() ([]byte, error) {
func (peer *Peer) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
Name string
Nickname string
UID uint64
Version uint64
Connections []Connection
}{peer.Name.String(), peer.UID, peer.version, peer.Connections()})
}{peer.Name.String(), peer.NickName, peer.UID, peer.version, peer.Connections()})
}
func (conn *RemoteConnection) MarshalJSON() ([]byte, error) {