summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-05 11:14:17 +0800
committerUnknwon <u@gogs.io>2015-08-05 11:14:17 +0800
commite50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84 (patch)
treef6dffcf1c5a273a077a8b33c75334b9994ca02ff /routers/api/v1/user.go
parent487fc8ca39a3de565fc6c67aea72c4658bbf64c8 (diff)
downloadgitea-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.go2
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})