mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user