diff options
author | Unknwon <u@gogs.io> | 2015-08-05 11:14:17 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-05 11:14:17 +0800 |
commit | e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84 (patch) | |
tree | f6dffcf1c5a273a077a8b33c75334b9994ca02ff /modules/middleware/repo.go | |
parent | 487fc8ca39a3de565fc6c67aea72c4658bbf64c8 (diff) | |
download | gitea-e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84.tar.gz gitea-e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84.zip |
allow anonymous SSH clone
Diffstat (limited to 'modules/middleware/repo.go')
-rw-r--r-- | modules/middleware/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 0aaecec84b..c14df2750e 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -41,7 +41,7 @@ func ApiRepoAssignment() macaron.Handler { } else { u, err = models.GetUserByName(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}) @@ -217,7 +217,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler { } else { u, err = models.GetUserByName(userName) if err != nil { - if err == models.ErrUserNotExist { + if models.IsErrUserNotExist(err) { ctx.Handle(404, "GetUserByName", err) } else { ctx.Handle(500, "GetUserByName", err) |