From 8731465957ba41c1f828285e19ee3bb234e2ef58 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Mon, 13 Mar 2017 21:26:51 +0900 Subject: Endpoint for APIv4: GET /team/{team_id}/channels (#5681) --- app/channel.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/channel.go') diff --git a/app/channel.go b/app/channel.go index f037e64c3..67caed94d 100644 --- a/app/channel.go +++ b/app/channel.go @@ -646,6 +646,14 @@ func GetChannelsUserNotIn(teamId string, userId string, offset int, limit int) ( } } +func GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) { + if result := <-Srv.Store.Channel().GetPublicChannelsForTeam(teamId, offset, limit); result.Err != nil { + return nil, result.Err + } else { + return result.Data.(*model.ChannelList), nil + } +} + func GetChannelMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) { if result := <-Srv.Store.Channel().GetMember(channelId, userId); result.Err != nil { return nil, result.Err -- cgit v1.2.3-1-g7c22