diff options
Diffstat (limited to 'routers/web/repo/activity.go')
-rw-r--r-- | routers/web/repo/activity.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/web/repo/activity.go b/routers/web/repo/activity.go index f9d248b06e..ae37b51403 100644 --- a/routers/web/repo/activity.go +++ b/routers/web/repo/activity.go @@ -9,6 +9,7 @@ import ( "time" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" ) @@ -52,10 +53,10 @@ func Activity(ctx *context.Context) { var err error if ctx.Data["Activity"], err = models.GetActivityStats(ctx.Repo.Repository, timeFrom, - ctx.Repo.CanRead(models.UnitTypeReleases), - ctx.Repo.CanRead(models.UnitTypeIssues), - ctx.Repo.CanRead(models.UnitTypePullRequests), - ctx.Repo.CanRead(models.UnitTypeCode)); err != nil { + ctx.Repo.CanRead(unit.TypeReleases), + ctx.Repo.CanRead(unit.TypeIssues), + ctx.Repo.CanRead(unit.TypePullRequests), + ctx.Repo.CanRead(unit.TypeCode)); err != nil { ctx.ServerError("GetActivityStats", err) return } |