MM-15422: Adds new parameters for retrieving pages of channels. (#10903)

* MM-15422: Adds new parameters for retrieving pages of channels and searching channels.

* MM-15422: Appends excluded channel names with defaults. Adds separate struct for data-tier option parameter.
This commit is contained in:
Martin Kraft
2019-05-24 11:28:42 -04:00
committed by GitHub
parent 124b371312
commit e8af4872c6
11 changed files with 256 additions and 91 deletions

View File

@@ -66,6 +66,8 @@ type Params struct {
NotAssociatedToChannel string
Paginate *bool
IncludeMemberCount bool
NotAssociatedToGroup string
ExcludeDefaultChannels bool
}
func ParamsFromRequest(r *http.Request) *Params {
@@ -260,5 +262,11 @@ func ParamsFromRequest(r *http.Request) *Params {
params.IncludeMemberCount = val
}
params.NotAssociatedToGroup = query.Get("not_associated_to_group")
if val, err := strconv.ParseBool(query.Get("exclude_default_channels")); err == nil {
params.ExcludeDefaultChannels = val
}
return params
}