(cherry picked from commit b6f97e8101)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
co-authored by
Ryan McKinley
parent
d32ca6a159
commit
d301b6611f
@@ -156,13 +156,17 @@ func (s *Service) doRandomWalk(query backend.DataQuery) backend.DataResponse {
|
||||
}
|
||||
|
||||
func (s *Service) doSearchQuery(ctx context.Context, req *backend.QueryDataRequest, query backend.DataQuery) backend.DataResponse {
|
||||
q := searchV2.DashboardQuery{}
|
||||
err := json.Unmarshal(query.JSON, &q)
|
||||
m := requestModel{}
|
||||
err := json.Unmarshal(query.JSON, &m)
|
||||
if err != nil {
|
||||
return backend.DataResponse{
|
||||
Error: err,
|
||||
}
|
||||
}
|
||||
return *s.search.DoDashboardQuery(ctx, req.PluginContext.User, req.PluginContext.OrgID, m.Search)
|
||||
}
|
||||
|
||||
return *s.search.DoDashboardQuery(ctx, req.PluginContext.User, req.PluginContext.OrgID, q)
|
||||
type requestModel struct {
|
||||
QueryType string `json:"queryType"`
|
||||
Search searchV2.DashboardQuery `json:"search,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user