Chore: Remove result field from search (#65583)

remove result field from search
This commit is contained in:
Serge Zaitsev
2023-03-30 11:28:12 +02:00
committed by GitHub
parent a02091cc19
commit f19569d61d
7 changed files with 38 additions and 42 deletions
+2 -2
View File
@@ -116,12 +116,12 @@ func (hs *HTTPServer) GetAlerts(c *contextmodel.ReqContext) response.Response {
Permission: dashboards.PERMISSION_VIEW,
}
err := hs.SearchService.SearchHandler(c.Req.Context(), &searchQuery)
hits, err := hs.SearchService.SearchHandler(c.Req.Context(), &searchQuery)
if err != nil {
return response.Error(500, "List alerts failed", err)
}
for _, d := range searchQuery.Result {
for _, d := range hits {
if d.Type == model.DashHitDB && d.ID > 0 {
dashboardIDs = append(dashboardIDs, d.ID)
}