@cryptotaxi247 / kubo / commits / efa55e02a

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}`.

Steven Allen committed Mar 24, 2021 at 20:29 UTC efa55e02a513ccf24da3ee0144628a6895b66cab
1 file changed +2 -2
core/commands/pin/pin.go
+2 -2
@@ -44,8 +44,8 @@ type PinOutput struct {
44 }
45
46 type AddPinOutput struct {
47 - Pins []string
48 - Progress int `json:",omitempty"`
47 + Pins []string `json:",omitempty"`
48 + Progress int `json:",omitempty"`
49 }
50
51 const (