diff options
Diffstat (limited to 'routers/api/v1/repo/issue_tracked_time.go')
-rw-r--r-- | routers/api/v1/repo/issue_tracked_time.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/v1/repo/issue_tracked_time.go b/routers/api/v1/repo/issue_tracked_time.go index e9d8fbab26..f73e63547b 100644 --- a/routers/api/v1/repo/issue_tracked_time.go +++ b/routers/api/v1/repo/issue_tracked_time.go @@ -10,6 +10,7 @@ import ( "time" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" @@ -108,7 +109,7 @@ func ListTrackedTimes(ctx *context.APIContext) { cantSetUser := !ctx.User.IsAdmin && opts.UserID != ctx.User.ID && - !ctx.IsUserRepoWriter([]models.UnitType{models.UnitTypeIssues}) + !ctx.IsUserRepoWriter([]unit.Type{unit.TypeIssues}) if cantSetUser { if opts.UserID == 0 { @@ -527,7 +528,7 @@ func ListTrackedTimesByRepository(ctx *context.APIContext) { cantSetUser := !ctx.User.IsAdmin && opts.UserID != ctx.User.ID && - !ctx.IsUserRepoWriter([]models.UnitType{models.UnitTypeIssues}) + !ctx.IsUserRepoWriter([]unit.Type{unit.TypeIssues}) if cantSetUser { if opts.UserID == 0 { |