Skip to content

Commit

Permalink
[Fleet] Use capabilities filter on categories endpoint (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet authored Jul 25, 2023
1 parent a462a21 commit 07b9cc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

* Add new query parameter "capabilities" in search endpoint [#1054](https://github.com/elastic/package-registry/pull/1054)
* Add new query parameter "capabilities" in categories endpoint [#1061](https://github.com/elastic/package-registry/pull/1061))

### Deprecated

Expand All @@ -34,7 +35,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

* New Security subcategory "Advanced Analytics (UEBA)" [#997](https://github.com/elastic/package-registry/pull/997)

### Deprecated

### Known Issues
Expand Down
5 changes: 5 additions & 0 deletions categories.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net/url"
"sort"
"strconv"
"strings"
"time"

"go.uber.org/zap"
Expand Down Expand Up @@ -127,6 +128,10 @@ func newCategoriesFilterFromQuery(query url.Values) (*packages.Filter, error) {
}
}

if v := query.Get("capabilities"); v != "" {
filter.Capabilities = strings.Split(v, ",")
}

return &filter, nil
}

Expand Down

0 comments on commit 07b9cc0

Please sign in to comment.