From 28a78d76074749a3b7f1ef2a56617b0a1c7fd623 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 24 Mar 2017 16:45:34 -0400 Subject: 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 --- app/channel.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/channel.go') 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 -- cgit v1.2.3-1-g7c22