Team: Support sort query param for teams search endpoint (#75622)

* Teams: Implement backend sorting

* Add docs

* Make name ordering case insensitive

* lint

* Fix no lowercasing on memberCount

* Add test to double check the filters or correctly OrderBy
This commit is contained in:
Gabriel MABILLE
2023-09-28 17:20:51 +02:00
committed by GitHub
parent a2964731eb
commit 6ffd4a23de
8 changed files with 233 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/grafana/grafana/pkg/kinds/team"
"github.com/grafana/grafana/pkg/services/auth/identity"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/search/model"
)
// Typed errors
@@ -90,6 +91,7 @@ type SearchTeamsQuery struct {
Limit int
Page int
OrgID int64 `xorm:"org_id"`
SortOpts []model.SortOption
SignedInUser identity.Requester
HiddenUsers map[string]struct{}
}