diff options
author | Unknwon <u@gogs.io> | 2015-08-05 11:14:17 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-05 11:14:17 +0800 |
commit | e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84 (patch) | |
tree | f6dffcf1c5a273a077a8b33c75334b9994ca02ff /routers/api/v1/user.go | |
parent | 487fc8ca39a3de565fc6c67aea72c4658bbf64c8 (diff) | |
download | gitea-e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84.tar.gz gitea-e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84.zip |
allow anonymous SSH clone
Diffstat (limited to 'routers/api/v1/user.go')
-rw-r--r-- | routers/api/v1/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/user.go b/routers/api/v1/user.go index a4648297b9..feecda483d 100644 --- a/routers/api/v1/user.go +++ b/routers/api/v1/user.go @@ -61,7 +61,7 @@ func SearchUsers(ctx *middleware.Context) { func GetUserInfo(ctx *middleware.Context) { u, err := models.GetUserByName(ctx.Params(":username")) if err != nil { - if err == models.ErrUserNotExist { + if models.IsErrUserNotExist(err) { ctx.Error(404) } else { ctx.JSON(500, &base.ApiJsonErr{"GetUserByName: " + err.Error(), base.DOC_URL}) |