aboutsummaryrefslogtreecommitdiff
path: root/internal/context/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/context/user.go')
-rw-r--r--internal/context/user.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/context/user.go b/internal/context/user.go
index d16b93b7..0d6ad67d 100644
--- a/internal/context/user.go
+++ b/internal/context/user.go
@@ -8,7 +8,6 @@ import (
"gopkg.in/macaron.v1"
"gogs.io/gogs/internal/db"
- "gogs.io/gogs/internal/db/errors"
)
// ParamsUser is the wrapper type of the target user defined by URL parameter, namely ':username'.
@@ -22,7 +21,7 @@ func InjectParamsUser() macaron.Handler {
return func(c *Context) {
user, err := db.GetUserByName(c.Params(":username"))
if err != nil {
- c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
+ c.NotFoundOrError(err, "get user by name")
return
}
c.Map(&ParamsUser{user})