Storage: simplify retrieving the file names from the response frame (#51805)

* add util method for storage list frame

* use go:embed

* remove enum
This commit is contained in:
Artur Wierzbicki
2022-07-07 10:47:05 +04:00
committed by GitHub
parent 4f931afe29
commit 052132be46
8 changed files with 267 additions and 23 deletions
+3 -3
View File
@@ -109,10 +109,10 @@ func (s *Service) doListQuery(ctx context.Context, query backend.DataQuery) back
}
path := store.RootPublicStatic + "/" + q.Path
frame, err := s.store.List(ctx, nil, path)
listFrame, err := s.store.List(ctx, nil, path)
response.Error = err
if frame != nil {
response.Frames = data.Frames{frame}
if listFrame != nil {
response.Frames = data.Frames{listFrame.Frame}
}
return response
}