photoprism/internal/query/errors.go
Michael Mayer f576b000b7 Add event log in Library > Errors
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-07-01 17:16:24 +02:00

15 lines
305 B
Go

package query
import (
"github.com/photoprism/photoprism/internal/entity"
)
// Errors returns the error log.
func Errors(limit, offset int) (results entity.Errors, err error) {
stmt := Db()
err = stmt.Order("error_time DESC").Limit(limit).Offset(offset).Find(&results).Error
return results, err
}