From 0ccd7c97abcb1ae314c9c17b0c08863cb13115fa Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 16 Mar 2017 17:18:43 -0400 Subject: models: rename ErrUserNotExist -> errors.UserNotExist --- routers/api/v1/user/user.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'routers/api/v1/user/user.go') 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) -- cgit v1.2.3