diff options
Diffstat (limited to 'routers/api/v1/admin/adopt.go')
-rw-r--r-- | routers/api/v1/admin/adopt.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/api/v1/admin/adopt.go b/routers/api/v1/admin/adopt.go index 184a2941a8..85262bc836 100644 --- a/routers/api/v1/admin/adopt.go +++ b/routers/api/v1/admin/adopt.go @@ -8,6 +8,7 @@ import ( "net/http" "code.gitea.io/gitea/models" + user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/routers/api/v1/utils" @@ -79,9 +80,9 @@ func AdoptRepository(ctx *context.APIContext) { ownerName := ctx.Params(":username") repoName := ctx.Params(":reponame") - ctxUser, err := models.GetUserByName(ownerName) + ctxUser, err := user_model.GetUserByName(ownerName) if err != nil { - if models.IsErrUserNotExist(err) { + if user_model.IsErrUserNotExist(err) { ctx.NotFound() return } @@ -141,9 +142,9 @@ func DeleteUnadoptedRepository(ctx *context.APIContext) { ownerName := ctx.Params(":username") repoName := ctx.Params(":reponame") - ctxUser, err := models.GetUserByName(ownerName) + ctxUser, err := user_model.GetUserByName(ownerName) if err != nil { - if models.IsErrUserNotExist(err) { + if user_model.IsErrUserNotExist(err) { ctx.NotFound() return } |