Skip to content
Permalink
Browse files

JSON Marshal MAC address correctly

  • Loading branch information...
lfkeitel committed Feb 6, 2018
1 parent f4fdc30 commit dc769fb7a332fdde5f73331e0cc88697b90fd9fe
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/models/device.go
@@ -76,12 +76,14 @@ func (d *Device) MarshalJSON() ([]byte, error) {
DateRegistered time.Time `json:"registered"`
LastSeen time.Time `json:"last_seen"`
Blacklisted bool `json:"blacklisted"`
MAC string `json:"mac"`
}{
Alias: (*Alias)(d),
Expires: d.Expires.UTC(),
DateRegistered: d.DateRegistered.UTC(),
LastSeen: d.LastSeen.UTC(),
Blacklisted: d.IsBlacklisted(),
MAC: d.MAC.String(),
})
}

0 comments on commit dc769fb

Please sign in to comment.
You can’t perform that action at this time.