Chore: Deprecate FolderID from DashboardSearchProjection (#77811)

This commit is contained in:
Kat Yang
2023-11-08 11:23:56 -05:00
committed by GitHub
parent 82daf05145
commit bc875b4c13
3 changed files with 9 additions and 6 deletions
@@ -1239,6 +1239,7 @@ func makeQueryResult(query *dashboards.FindPersistedDashboardsQuery, res []dashb
Tags: []string{},
}
// nolint:staticcheck
if item.FolderID > 0 {
hit.FolderURL = dashboards.GetFolderURL(item.FolderUID, item.FolderSlug)
}
+7 -6
View File
@@ -348,12 +348,13 @@ type SaveDashboardDTO struct {
}
type DashboardSearchProjection struct {
ID int64 `xorm:"id"`
UID string `xorm:"uid"`
Title string
Slug string
Term string
IsFolder bool
ID int64 `xorm:"id"`
UID string `xorm:"uid"`
Title string
Slug string
Term string
IsFolder bool
// Deprecated: use FolderUID instead
FolderID int64 `xorm:"folder_id"`
FolderUID string `xorm:"folder_uid"`
FolderSlug string
@@ -564,6 +564,7 @@ func makeQueryResult(query *dashboards.FindPersistedDashboardsQuery, res []dashb
Tags: []string{},
}
// nolint:staticcheck
if item.FolderID > 0 {
hit.FolderURL = dashboards.GetFolderURL(item.FolderUID, item.FolderSlug)
}