mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid null in json response
This commit is contained in:
parent
a74f6cf593
commit
a7d8d46306
|
@ -43,7 +43,7 @@ func dirLookupHandler(w http.ResponseWriter, r *http.Request) {
|
|||
volumeId, _ := storage.NewVolumeId(vid)
|
||||
machines, e := mapper.Get(volumeId)
|
||||
if e == nil {
|
||||
var ret []map[string]string
|
||||
ret:= []map[string]string{}
|
||||
for _, machine := range machines {
|
||||
ret = append(ret,map[string]string{"url": machine.Url, "publicUrl": machine.PublicUrl})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue