diff options
author | Unknwon <u@gogs.io> | 2017-03-23 14:27:34 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-23 14:27:34 -0400 |
commit | beee6e03b15e594f396fb2fb769b58e543ef1794 (patch) | |
tree | 471a20e88e3ee8c1bfcd39d6bef2f420ed618287 /routers/repo | |
parent | 902372067cad9cfe7360473d1b985217a308a949 (diff) |
error: move ErrRepoNotExist -> errors.RepoNotExist
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/http.go | 2 | ||||
-rw-r--r-- | routers/repo/pull.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go index b385a13a..e1cc5f96 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -66,7 +66,7 @@ func HTTPContexter() macaron.Handler { repo, err := models.GetRepositoryByName(owner.ID, repoName) if err != nil { - ctx.NotFoundOrServerError("GetRepositoryByName", models.IsErrRepoNotExist, err) + ctx.NotFoundOrServerError("GetRepositoryByName", errors.IsRepoNotExist, err) return } diff --git a/routers/repo/pull.go b/routers/repo/pull.go index aa61dcd9..51d34877 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -42,7 +42,7 @@ var ( func parseBaseRepository(ctx *context.Context) *models.Repository { baseRepo, err := models.GetRepositoryByID(ctx.ParamsInt64(":repoid")) if err != nil { - ctx.NotFoundOrServerError("GetRepositoryByID", models.IsErrRepoNotExist, err) + ctx.NotFoundOrServerError("GetRepositoryByID", errors.IsRepoNotExist, err) return nil } @@ -718,7 +718,7 @@ func parseOwnerAndRepo(ctx *context.Context) (*models.User, *models.Repository) repo, err := models.GetRepositoryByName(owner.ID, ctx.Params(":reponame")) if err != nil { - ctx.NotFoundOrServerError("GetRepositoryByName", models.IsErrRepoNotExist, err) + ctx.NotFoundOrServerError("GetRepositoryByName", errors.IsRepoNotExist, err) return nil, nil } |