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.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
124b371312
Коммит
e8af4872c6
@@ -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
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user