summaryrefslogtreecommitdiffstats
path: root/api4
diff options
context:
space:
mode:
Diffstat (limited to 'api4')
-rw-r--r--api4/channel.go5
-rw-r--r--api4/channel_test.go2
2 files changed, 1 insertions, 6 deletions
diff --git a/api4/channel.go b/api4/channel.go
index 5d1651d74..c8235c5f1 100644
--- a/api4/channel.go
+++ b/api4/channel.go
@@ -456,11 +456,6 @@ func searchChannelsForTeam(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if len(props.Term) == 0 {
- c.SetInvalidParam("term")
- return
- }
-
if !app.SessionHasPermissionToTeam(c.Session, c.Params.TeamId, model.PERMISSION_LIST_TEAM_CHANNELS) {
c.SetPermissionError(model.PERMISSION_LIST_TEAM_CHANNELS)
return
diff --git a/api4/channel_test.go b/api4/channel_test.go
index 3c9b6d720..345bbefaf 100644
--- a/api4/channel_test.go
+++ b/api4/channel_test.go
@@ -721,7 +721,7 @@ func TestSearchChannels(t *testing.T) {
search.Term = ""
_, resp = Client.SearchChannels(th.BasicTeam.Id, search)
- CheckBadRequestStatus(t, resp)
+ CheckNoError(t, resp)
search.Term = th.BasicChannel.Name
_, resp = Client.SearchChannels(model.NewId(), search)