MM-25261: Add 'include_deleted' parameter to get all channels API req… (#14721)

* MM-25261: Add 'include_deleted' parameter to get all channels API request.

* MM-25261: Adds test for deleted channels.

* MM-25261: Switches to single liner.

* MM-25261: Adhere to beta config setting for viewing archived channels.

* MM-25261: Test fix.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Martin Kraft
2020-06-19 16:53:37 -04:00
коммит произвёл GitHub
родитель d391fd6231
Коммит 6158e91308
4 изменённых файлов: 49 добавлений и 1 удалений

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

@@ -687,6 +687,7 @@ func getAllChannels(c *Context, w http.ResponseWriter, r *http.Request) {
opts := model.ChannelSearchOpts{
NotAssociatedToGroup: c.Params.NotAssociatedToGroup,
ExcludeDefaultChannels: c.Params.ExcludeDefaultChannels,
IncludeDeleted: c.Params.IncludeDeleted,
}
channels, err := c.App.GetAllChannels(c.Params.Page, c.Params.PerPage, opts)