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
Этот коммит содержится в:
Joram Wilander
2017-03-24 16:45:34 -04:00
коммит произвёл Corey Hulen
родитель 22715a31ed
Коммит 28a78d7607
6 изменённых файлов: 364 добавлений и 1 удалений

Просмотреть файл

@@ -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