Chore: Deprecate ID in GetFolderQuery (#77647)

This commit is contained in:
Kat Yang
2023-11-15 10:30:00 -05:00
committed by GitHub
parent a640d9d395
commit 8d581b8358
7 changed files with 13 additions and 6 deletions
+2
View File
@@ -123,6 +123,7 @@ func (s *Service) Get(ctx context.Context, cmd *folder.GetFolderQuery) (*folder.
if err != nil {
return nil, err
}
// nolint:staticcheck
case cmd.ID != nil:
dashFolder, err = s.getFolderByID(ctx, *cmd.ID, cmd.OrgID)
if err != nil {
@@ -160,6 +161,7 @@ func (s *Service) Get(ctx context.Context, cmd *folder.GetFolderQuery) (*folder.
return dashFolder, nil
}
// nolint:staticcheck
if cmd.ID != nil {
cmd.ID = nil
cmd.UID = &dashFolder.UID