summaryrefslogtreecommitdiffstats
path: root/app/data_retention.go
blob: b931ca8b193e409bb883b3aa346ae52a5ebc13b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()
}