fix: omit empty pins slice when reporting pin progress

Otherwise, we get messages of the form `{Pins: null, Progress: 100}`.
After this change, we'll get `{Progress: 100}`.
This commit is contained in:
Steven Allen 2021-03-24 20:29:11 -07:00
parent 3f9c3f4557
commit efa55e02a5

View File

@ -44,8 +44,8 @@ type PinOutput struct {
}
type AddPinOutput struct {
Pins []string
Progress int `json:",omitempty"`
Pins []string `json:",omitempty"`
Progress int `json:",omitempty"`
}
const (