Chore: Deprecate FolderID in CreateLibraryElementComand (#77403)

* Chore: Deprecate FolderID in CreateLibraryElementComand

* chore: add remaining nolint comments

* chore: regen specs to include deprecation notice
This commit is contained in:
Kat Yang
2023-10-31 13:24:16 -04:00
committed by GitHub
parent 5f6d15d912
commit 254648b96b
9 changed files with 18 additions and 8 deletions
+2
View File
@@ -62,6 +62,7 @@ func (l *LibraryElementService) createHandler(c *contextmodel.ReqContext) respon
if cmd.FolderUID != nil {
if *cmd.FolderUID == "" {
// nolint:staticcheck
cmd.FolderID = 0
generalFolderUID := ac.GeneralFolderUID
cmd.FolderUID = &generalFolderUID
@@ -70,6 +71,7 @@ func (l *LibraryElementService) createHandler(c *contextmodel.ReqContext) respon
if err != nil || folder == nil {
return response.ErrOrFallback(http.StatusBadRequest, "failed to get folder", err)
}
// nolint:staticcheck
cmd.FolderID = folder.ID
}
}