diff options
Diffstat (limited to 'routers/api/v1/repo/mirror.go')
-rw-r--r-- | routers/api/v1/repo/mirror.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/mirror.go b/routers/api/v1/repo/mirror.go index 67d0c7ee1c..c9ac3e8292 100644 --- a/routers/api/v1/repo/mirror.go +++ b/routers/api/v1/repo/mirror.go @@ -7,7 +7,7 @@ package repo import ( "net/http" - "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" mirror_service "code.gitea.io/gitea/services/mirror" @@ -39,7 +39,7 @@ func MirrorSync(ctx *context.APIContext) { repo := ctx.Repo.Repository - if !ctx.Repo.CanWrite(models.UnitTypeCode) { + if !ctx.Repo.CanWrite(unit.TypeCode) { ctx.Error(http.StatusForbidden, "MirrorSync", "Must have write access") } |