[MM-25990] Add filters to search all channels (#15009)

* MM-25990 Add filters to search all channels endpoint and clean up tests

* Add deleted filter

* Remove redundant private public query
Этот коммит содержится в:
Farhan Munshi
2020-07-23 10:46:33 -04:00
коммит произвёл GitHub
родитель aad940e104
Коммит ed34468996
8 изменённых файлов: 278 добавлений и 151 удалений

Просмотреть файл

@@ -120,12 +120,18 @@ type ChannelModeratedRolesPatch struct {
// PerPage number of results per page, if paginated.
//
type ChannelSearchOpts struct {
NotAssociatedToGroup string
ExcludeDefaultChannels bool
IncludeDeleted bool
ExcludeChannelNames []string
Page *int
PerPage *int
NotAssociatedToGroup string
ExcludeDefaultChannels bool
IncludeDeleted bool
Deleted bool
ExcludeChannelNames []string
TeamIds []string
GroupConstrained bool
ExcludeGroupConstrained bool
Public bool
Private bool
Page *int
PerPage *int
}
type ChannelMemberCountByGroup struct {

Просмотреть файл

@@ -11,11 +11,18 @@ import (
const CHANNEL_SEARCH_DEFAULT_LIMIT = 50
type ChannelSearch struct {
Term string `json:"term"`
ExcludeDefaultChannels bool `json:"exclude_default_channels"`
NotAssociatedToGroup string `json:"not_associated_to_group"`
Page *int `json:"page,omitempty"`
PerPage *int `json:"per_page,omitempty"`
Term string `json:"term"`
ExcludeDefaultChannels bool `json:"exclude_default_channels"`
NotAssociatedToGroup string `json:"not_associated_to_group"`
TeamIds []string `json:"team_ids"`
GroupConstrained bool `json:"group_constrained"`
ExcludeGroupConstrained bool `json:"exclude_group_constrained"`
Public bool `json:"public"`
Private bool `json:"private"`
IncludeDeleted bool `json:"include_deleted"`
Deleted bool `json:"deleted"`
Page *int `json:"page,omitempty"`
PerPage *int `json:"per_page,omitempty"`
}
// ToJson convert a Channel to a json string