diff options
author | Gusted <williamzijl7@hotmail.com> | 2021-11-08 08:04:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-08 08:04:13 +0100 |
commit | ebaf4c48ea278955c5d79c5f37a2039ccb3cf775 (patch) | |
tree | 574893d946aaaf14a752d7e6a37408e4a0f85a9d /routers/api | |
parent | Remove appSubUrl from pasted images (#17572) (diff) | |
download | forgejo-ebaf4c48ea278955c5d79c5f37a2039ccb3cf775.tar.xz forgejo-ebaf4c48ea278955c5d79c5f37a2039ccb3cf775.zip |
Avoid double imports (#17569)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/repo/transfer.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/api/v1/repo/transfer.go b/routers/api/v1/repo/transfer.go index 2e052aa4ff..c13a2e4857 100644 --- a/routers/api/v1/repo/transfer.go +++ b/routers/api/v1/repo/transfer.go @@ -12,7 +12,6 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/structs" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/web" repo_service "code.gitea.io/gitea/services/repository" @@ -65,7 +64,7 @@ func Transfer(ctx *context.APIContext) { } if newOwner.Type == models.UserTypeOrganization { - if !ctx.User.IsAdmin && newOwner.Visibility == structs.VisibleTypePrivate && !newOwner.HasMemberWithUserID(ctx.User.ID) { + if !ctx.User.IsAdmin && newOwner.Visibility == api.VisibleTypePrivate && !newOwner.HasMemberWithUserID(ctx.User.ID) { // The user shouldn't know about this organization ctx.Error(http.StatusNotFound, "", "The new owner does not exist or cannot be found") return |