[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 удалений

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

@@ -2192,11 +2192,17 @@ func (a *App) SearchAllChannels(term string, opts model.ChannelSearchOpts) (*mod
opts.ExcludeChannelNames = a.DefaultChannelNames()
}
storeOpts := store.ChannelSearchOpts{
ExcludeChannelNames: opts.ExcludeChannelNames,
NotAssociatedToGroup: opts.NotAssociatedToGroup,
IncludeDeleted: opts.IncludeDeleted,
Page: opts.Page,
PerPage: opts.PerPage,
ExcludeChannelNames: opts.ExcludeChannelNames,
NotAssociatedToGroup: opts.NotAssociatedToGroup,
IncludeDeleted: opts.IncludeDeleted,
Deleted: opts.Deleted,
TeamIds: opts.TeamIds,
GroupConstrained: opts.GroupConstrained,
ExcludeGroupConstrained: opts.ExcludeGroupConstrained,
Public: opts.Public,
Private: opts.Private,
Page: opts.Page,
PerPage: opts.PerPage,
}
term = strings.TrimSpace(term)