Dashboards: Fix creating dashboard under folder using deprecated API (#77501)
* Dashboards: Add integration tests for creating a dashboard * Fix creating dashboard under folder using deprecated API * Update swagger response * Fix comments
This commit is contained in:
@@ -116,7 +116,7 @@ func (s *Service) Get(ctx context.Context, cmd *folder.GetFolderQuery) (*folder.
|
||||
var dashFolder *folder.Folder
|
||||
var err error
|
||||
switch {
|
||||
case cmd.UID != nil:
|
||||
case cmd.UID != nil && *cmd.UID != "":
|
||||
dashFolder, err = s.getFolderByUID(ctx, cmd.OrgID, *cmd.UID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -13,9 +13,9 @@ type Service interface {
|
||||
Create(ctx context.Context, cmd *CreateFolderCommand) (*Folder, error)
|
||||
|
||||
// GetFolder takes a GetFolderCommand and returns a folder matching the
|
||||
// request. One of ID, UID, or Title must be included. If multiple values
|
||||
// request. One of UID, ID or Title must be included. If multiple values
|
||||
// are included in the request, Grafana will select one in order of
|
||||
// specificity (ID, UID, Title).
|
||||
// specificity (UID, ID, Title).
|
||||
Get(ctx context.Context, cmd *GetFolderQuery) (*Folder, error)
|
||||
|
||||
// Update is used to update a folder's UID, Title and Description. To change
|
||||
|
||||
Reference in New Issue
Block a user