diff options
author | Robin Naundorf <r.naundorf@fh-muenster.de> | 2017-05-15 22:12:30 +0200 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-05-15 16:12:30 -0400 |
commit | 0a20e8d3269515e2d44a0bcad0a2408f62245814 (patch) | |
tree | 533767c6a60939504f8f70c60bd4ff77ef0e8fe7 /app | |
parent | 34728f748bfd7976c085f1be77e53f70d6e55a06 (diff) | |
download | chat-0a20e8d3269515e2d44a0bcad0a2408f62245814.tar.gz chat-0a20e8d3269515e2d44a0bcad0a2408f62245814.tar.bz2 chat-0a20e8d3269515e2d44a0bcad0a2408f62245814.zip |
PLT-6019: Add APIv4 Endpoint for restoring Channels (#6263)
Diffstat (limited to 'app')
-rw-r--r-- | app/channel.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/channel.go b/app/channel.go index 4164b37ce..bd9acaa6d 100644 --- a/app/channel.go +++ b/app/channel.go @@ -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 |