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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user