PLT-6019: Add APIv4 Endpoint for restoring Channels (#6263)

Этот коммит содержится в:
Robin Naundorf
2017-05-15 22:12:30 +02:00
коммит произвёл Joram Wilander
родитель 34728f748b
Коммит 0a20e8d326
7 изменённых файлов: 108 добавлений и 0 удалений

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

@@ -285,6 +285,14 @@ func UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
}
}
func RestoreChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
if result := <-Srv.Store.Channel().Restore(channel.Id, model.GetMillis()); result.Err != nil {
return nil, result.Err
} else {
return channel, nil
}
}
func PatchChannel(channel *model.Channel, patch *model.ChannelPatch, userId string) (*model.Channel, *model.AppError) {
oldChannelDisplayName := channel.DisplayName
oldChannelHeader := channel.Header