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
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
22715a31ed
Коммит
28a78d7607
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user