Files
mattermost/app/audit.go
Jesús Espino 12c50eb830 Initial migration of the store to be sync (#10592)
* Migrating audit store

* Final migration example for the audit store

* async example

* Ending migration

* Removing Async helper

* Fixing tests

* Fixing govet problems with the StoreResult instanstiation
2019-04-15 22:53:52 +02:00

17 lines
489 B
Go

// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package app
import (
"github.com/mattermost/mattermost-server/model"
)
func (a *App) GetAudits(userId string, limit int) (model.Audits, *model.AppError) {
return a.Srv.Store.Audit().Get(userId, 0, limit)
}
func (a *App) GetAuditsPage(userId string, page int, perPage int) (model.Audits, *model.AppError) {
return a.Srv.Store.Audit().Get(userId, page*perPage, perPage)
}