mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-14 01:35:55 +09:00
Clean code
This commit is contained in:
1 parent
631deb2e7d
commit
828c89de99
7 files changed
+19
-26
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user