PLT-6019: Add APIv4 Endpoint for restoring Channels (#6263)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
34728f748b
Коммит
0a20e8d326
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user