diff options
Diffstat (limited to 'routers/api/v1/user/key.go')
-rw-r--r-- | routers/api/v1/user/key.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go index 3e407fef..941cfb60 100644 --- a/routers/api/v1/user/key.go +++ b/routers/api/v1/user/key.go @@ -8,6 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" + "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/routers/api/v1/convert" @@ -17,7 +18,7 @@ import ( func GetUserByParamsName(ctx *context.APIContext, name string) *models.User { user, err := models.GetUserByName(ctx.Params(name)) if err != nil { - if models.IsErrUserNotExist(err) { + if errors.IsUserNotExist(err) { ctx.Status(404) } else { ctx.Error(500, "GetUserByName", err) |