diff options
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 1d7d4251db..af5ab96d05 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -161,10 +161,10 @@ func repoAssignment() func(ctx *context.APIContext) { repo, err := repo_model.GetRepositoryByName(owner.ID, repoName) if err != nil { if repo_model.IsErrRepoNotExist(err) { - redirectRepoID, err := models.LookupRepoRedirect(owner.ID, repoName) + redirectRepoID, err := repo_model.LookupRedirect(owner.ID, repoName) if err == nil { context.RedirectToRepo(ctx.Context, redirectRepoID) - } else if models.IsErrRepoRedirectNotExist(err) { + } else if repo_model.IsErrRedirectNotExist(err) { ctx.NotFound() } else { ctx.Error(http.StatusInternalServerError, "LookupRepoRedirect", err) |