summaryrefslogtreecommitdiffstats
path: root/app/data_retention.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-10-02 12:43:21 +0100
committerGitHub <noreply@github.com>2017-10-02 12:43:21 +0100
commit76bd1bb212177824379c485c553e54530a854009 (patch)
treef4b3c41ff3ff72c96ab58e944e4254bfca4fd8be /app/data_retention.go
parent9bc7af0c5704bbf73f8240b4569d5ea215352e39 (diff)
downloadchat-76bd1bb212177824379c485c553e54530a854009.tar.gz
chat-76bd1bb212177824379c485c553e54530a854009.tar.bz2
chat-76bd1bb212177824379c485c553e54530a854009.zip
PLT-7705: API to get data retention policy. (#7539)
* PLT-7705: API to get data retention policy. * Fix review comments.
Diffstat (limited to 'app/data_retention.go')
-rw-r--r--app/data_retention.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/data_retention.go b/app/data_retention.go
new file mode 100644
index 000000000..b931ca8b1
--- /dev/null
+++ b/app/data_retention.go
@@ -0,0 +1,18 @@
+// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+package app
+
+import (
+ "net/http"
+
+ "github.com/mattermost/mattermost-server/model"
+)
+
+func (a *App) GetDataRetentionPolicy() (*model.DataRetentionPolicy, *model.AppError) {
+ if a.DataRetention == nil {
+ return nil, model.NewAppError("App.GetDataRetentionPolicy", "ent.data_retention.generic.license.error", nil, "", http.StatusNotImplemented)
+ }
+
+ return a.DataRetention.GetPolicy()
+}