Add missing implementation for GET /api/v3/cluster/fs/{storage}

This commit is contained in:
Ingo Oppermann
2023-11-27 12:51:14 +01:00
parent a817cd37b4
commit 2c47ab77d2
4 changed files with 37 additions and 46 deletions

View File

@@ -738,7 +738,16 @@ func (n *node) FileList(storage, pattern string) ([]clientapi.FileInfo, error) {
return nil, ErrNoPeer
}
return n.peer.FilesystemList(storage, pattern, "", "")
files, err := n.peer.FilesystemList(storage, pattern, "", "")
if err != nil {
return nil, err
}
for i := range files {
files[i].CoreID = n.id
}
return files, nil
}
func cloneURL(src *url.URL) *url.URL {