diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-03-13 10:14:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 10:14:16 -0400 |
commit | 3ebfb369530e28ca3246c5cd2833e666edce9c90 (patch) | |
tree | a91ef74768301db727ca062354af9cac2b444001 /app | |
parent | a284cd8c1817bb5419cb9eae118c85cd7e99c039 (diff) | |
download | chat-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')
-rw-r--r-- | app/compliance.go | 4 |
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 |