fix: remote services ls always return a list

Closes #7824
parent 2ed92544
......@@ -486,7 +486,7 @@ var lsRemotePinServiceCmd = &cmds.Command{
return err
}
if cfg.Pinning.RemoteServices == nil {
return nil // no pinning services added yet
return cmds.EmitOnce(res, &PinServicesList{make([]ServiceDetails, 0)})
}
services := cfg.Pinning.RemoteServices
result := PinServicesList{make([]ServiceDetails, 0, len(services))}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment