diff options
Diffstat (limited to 'routes/api/v1/user/user.go')
-rw-r--r-- | routes/api/v1/user/user.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/routes/api/v1/user/user.go b/routes/api/v1/user/user.go index 9a5cbb5c..70897166 100644 --- a/routes/api/v1/user/user.go +++ b/routes/api/v1/user/user.go @@ -58,11 +58,7 @@ func Search(c *context.APIContext) { func GetInfo(c *context.APIContext) { u, err := models.GetUserByName(c.Params(":username")) if err != nil { - if errors.IsUserNotExist(err) { - c.NotFound() - } else { - c.ServerError("GetUserByName", err) - } + c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err) return } |