diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-16 02:28:24 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-16 02:28:24 -0400 |
commit | 828c89de996c328bb3759d90be8a8a35b4d9cdc0 (patch) | |
tree | bc0c01f6fb9905892439e8b0eb3aaa76cd01eacf /modules | |
parent | 631deb2e7d52d474469382c497878bde9083cb60 (diff) | |
download | gitea-828c89de996c328bb3759d90be8a8a35b4d9cdc0.tar.gz gitea-828c89de996c328bb3759d90be8a8a35b4d9cdc0.zip |
Clean code
Diffstat (limited to 'modules')
-rw-r--r-- | modules/middleware/repo.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 948713efe8..8cdc6df718 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -5,6 +5,8 @@ package middleware import ( + "errors" + "github.com/codegangsta/martini" "github.com/gogits/gogs/models" @@ -31,9 +33,7 @@ func RepoAssignment(redirect bool) martini.Handler { ctx.Render.Redirect("/") return } - //data["ErrorMsg"] = err - //log.Error("repo.Single: %v", err) - //r.HTML(200, "base/error", data) + ctx.Handle(200, "RepoAssignment", err) return } } else { @@ -45,9 +45,7 @@ func RepoAssignment(redirect bool) martini.Handler { ctx.Render.Redirect("/") return } - //data["ErrorMsg"] = "invliad user account for single repository" - //log.Error("repo.Single: %v", err) - //r.HTML(200, "base/error", data) + ctx.Handle(200, "RepoAssignment", errors.New("invliad user account for single repository")) return } @@ -60,9 +58,7 @@ func RepoAssignment(redirect bool) martini.Handler { ctx.Render.Redirect("/") return } - //data["ErrorMsg"] = err - //log.Error("repo.Single: %v", err) - //r.HTML(200, "base/error", data) + ctx.Handle(200, "RepoAssignment", err) return } |