summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-03-13 21:26:51 +0900
committerGeorge Goldberg <george@gberg.me>2017-03-13 12:26:51 +0000
commit8731465957ba41c1f828285e19ee3bb234e2ef58 (patch)
tree4051efe2fb0ec981e7004c32cf79d3592471fdfb /app/channel.go
parent3559fb7959cf008b038239f2e7c43e604c44cd31 (diff)
downloadchat-8731465957ba41c1f828285e19ee3bb234e2ef58.tar.gz
chat-8731465957ba41c1f828285e19ee3bb234e2ef58.tar.bz2
chat-8731465957ba41c1f828285e19ee3bb234e2ef58.zip
Endpoint for APIv4: GET /team/{team_id}/channels (#5681)
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go8
1 files changed, 8 insertions, 0 deletions
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