mirror of
https://github.com/gogs/gogs.git
synced 2025-12-20 23:30:00 +01:00
error: move ErrRepoNotExist -> errors.RepoNotExist
This commit is contained in:
@@ -6,13 +6,14 @@ package admin
|
||||
|
||||
import (
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
)
|
||||
|
||||
func GetRepositoryByParams(ctx *context.APIContext) *models.Repository {
|
||||
repo, err := models.GetRepositoryByName(ctx.Org.Team.OrgID, ctx.Params(":reponame"))
|
||||
if err != nil {
|
||||
if models.IsErrRepoNotExist(err) {
|
||||
if errors.IsRepoNotExist(err) {
|
||||
ctx.Status(404)
|
||||
} else {
|
||||
ctx.Error(500, "GetRepositoryByName", err)
|
||||
|
||||
Reference in New Issue
Block a user