summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-24 16:45:34 -0400
committerCorey Hulen <corey@hulen.com>2017-03-24 13:45:34 -0700
commit28a78d76074749a3b7f1ef2a56617b0a1c7fd623 (patch)
tree4adc9c167991a9cea04fa9cc3c01e247a50293c8 /app/channel.go
parent22715a31ed6238eb4f8f0dd8125bf23958345e78 (diff)
downloadchat-28a78d76074749a3b7f1ef2a56617b0a1c7fd623.tar.gz
chat-28a78d76074749a3b7f1ef2a56617b0a1c7fd623.tar.bz2
chat-28a78d76074749a3b7f1ef2a56617b0a1c7fd623.zip
Implement some channel endpoints for APIv4 (#5846)
* Add v4 endpoint for getting the channels on a team for a user * Implement PUT /channels/{channel_id}/patch endpoint for APIv4 * Implement POST /teams/{team_id}/channels/search endpoint for APIv4 * Update permission check
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/channel.go b/app/channel.go
index d66624f2c..51688ad87 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -260,6 +260,11 @@ func UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
}
}
+func PatchChannel(channel *model.Channel, patch *model.ChannelPatch) (*model.Channel, *model.AppError) {
+ channel.Patch(patch)
+ return UpdateChannel(channel)
+}
+
func UpdateChannelMemberRoles(channelId string, userId string, newRoles string) (*model.ChannelMember, *model.AppError) {
var member *model.ChannelMember
var err *model.AppError