From e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 5 Aug 2015 11:14:17 +0800 Subject: allow anonymous SSH clone --- routers/api/v1/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/api/v1/user.go') diff --git a/routers/api/v1/user.go b/routers/api/v1/user.go index a4648297..feecda48 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}) -- cgit v1.2.3