diff options
author | Robin Naundorf <r.naundorf@fh-muenster.de> | 2017-05-09 14:52:46 +0200 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-05-09 07:52:46 -0500 |
commit | 5efcd2d9d3fb91ae7475918b807b7947b533da9b (patch) | |
tree | 7f1c0bfe5ca751b27b6a520f63cd20e280377d85 /app/channel.go | |
parent | 530814b8c9b1b47dd6eb05e70548c61d75da9a23 (diff) | |
download | chat-5efcd2d9d3fb91ae7475918b807b7947b533da9b.tar.gz chat-5efcd2d9d3fb91ae7475918b807b7947b533da9b.tar.bz2 chat-5efcd2d9d3fb91ae7475918b807b7947b533da9b.zip |
Add API Endpoint for deleted Channels (#5889)
Diffstat (limited to 'app/channel.go')
-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 ee53ace45..b4855bc9e 100644 --- a/app/channel.go +++ b/app/channel.go @@ -720,6 +720,14 @@ func GetChannelsForUser(teamId string, userId string) (*model.ChannelList, *mode } } +func GetDeletedChannels(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) { + if result := <-Srv.Store.Channel().GetDeleted(teamId, offset, limit); result.Err != nil { + return nil, result.Err + } else { + return result.Data.(*model.ChannelList), nil + } +} + func GetChannelsUserNotIn(teamId string, userId string, offset int, limit int) (*model.ChannelList, *model.AppError) { if result := <-Srv.Store.Channel().GetMoreChannels(teamId, userId, offset, limit); result.Err != nil { return nil, result.Err |