Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Add peer nickname to JSON status #472

Merged
merged 1 commit into from
Mar 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion router/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down