summaryrefslogtreecommitdiffstats
path: root/store/sql_channel_store.go
diff options
context:
space:
mode:
authorRobin Naundorf <r.naundorf@fh-muenster.de>2017-05-15 22:12:30 +0200
committerJoram Wilander <jwawilander@gmail.com>2017-05-15 16:12:30 -0400
commit0a20e8d3269515e2d44a0bcad0a2408f62245814 (patch)
tree533767c6a60939504f8f70c60bd4ff77ef0e8fe7 /store/sql_channel_store.go
parent34728f748bfd7976c085f1be77e53f70d6e55a06 (diff)
downloadchat-0a20e8d3269515e2d44a0bcad0a2408f62245814.tar.gz
chat-0a20e8d3269515e2d44a0bcad0a2408f62245814.tar.bz2
chat-0a20e8d3269515e2d44a0bcad0a2408f62245814.zip
PLT-6019: Add APIv4 Endpoint for restoring Channels (#6263)
Diffstat (limited to 'store/sql_channel_store.go')
-rw-r--r--store/sql_channel_store.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go
index f3619c03a..c9b6d89b8 100644
--- a/store/sql_channel_store.go
+++ b/store/sql_channel_store.go
@@ -440,6 +440,10 @@ func (s SqlChannelStore) Delete(channelId string, time int64) StoreChannel {
return s.SetDeleteAt(channelId, time, time)
}
+func (s SqlChannelStore) Restore(channelId string, time int64) StoreChannel {
+ return s.SetDeleteAt(channelId, 0, time)
+}
+
func (s SqlChannelStore) SetDeleteAt(channelId string, deleteAt int64, updateAt int64) StoreChannel {
storeChannel := make(StoreChannel, 1)