diff options
author | Unknwon <u@gogs.io> | 2017-03-16 17:18:43 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-16 17:18:43 -0400 |
commit | 0ccd7c97abcb1ae314c9c17b0c08863cb13115fa (patch) | |
tree | d5314ef88257d64b3749194c024ca853486f799e /routers/api/v1/user/user.go | |
parent | 4e64e71e28dcfb9ef41d7cbc63ff1474ad8e5126 (diff) |
models: rename ErrUserNotExist -> errors.UserNotExist
Diffstat (limited to 'routers/api/v1/user/user.go')
-rw-r--r-- | routers/api/v1/user/user.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index b526af5d..b1f06ec7 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -10,6 +10,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" ) @@ -54,7 +55,7 @@ func Search(ctx *context.APIContext) { func GetInfo(ctx *context.APIContext) { u, err := models.GetUserByName(ctx.Params(":username")) if err != nil { - if models.IsErrUserNotExist(err) { + if errors.IsUserNotExist(err) { ctx.Status(404) } else { ctx.Error(500, "GetUserByName", err) |