summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user.go
diff options
context:
space:
mode:
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})