summaryrefslogtreecommitdiffstats
path: root/app/compliance.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-13 10:14:16 -0400
committerGitHub <noreply@github.com>2017-03-13 10:14:16 -0400
commit3ebfb369530e28ca3246c5cd2833e666edce9c90 (patch)
treea91ef74768301db727ca062354af9cac2b444001 /app/compliance.go
parenta284cd8c1817bb5419cb9eae118c85cd7e99c039 (diff)
downloadchat-3ebfb369530e28ca3246c5cd2833e666edce9c90.tar.gz
chat-3ebfb369530e28ca3246c5cd2833e666edce9c90.tar.bz2
chat-3ebfb369530e28ca3246c5cd2833e666edce9c90.zip
Implement compliance endpoints for APIv4 (#5683)
* Implement compliance endpoints for APIv4 * Add paging to get reports endpoint
Diffstat (limited to 'app/compliance.go')
-rw-r--r--app/compliance.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/compliance.go b/app/compliance.go
index ffef69b44..966b9b523 100644
--- a/app/compliance.go
+++ b/app/compliance.go
@@ -11,12 +11,12 @@ import (
"github.com/mattermost/platform/utils"
)
-func GetComplianceReports() (model.Compliances, *model.AppError) {
+func GetComplianceReports(page, perPage int) (model.Compliances, *model.AppError) {
if !*utils.Cfg.ComplianceSettings.Enable || !utils.IsLicensed || !*utils.License.Features.Compliance {
return nil, model.NewLocAppError("GetComplianceReports", "ent.compliance.licence_disable.app_error", nil, "")
}
- if result := <-Srv.Store.Compliance().GetAll(); result.Err != nil {
+ if result := <-Srv.Store.Compliance().GetAll(page*perPage, perPage); result.Err != nil {
return nil, result.Err
} else {
return result.Data.(model.Compliances), nil