diff options
author | slene <vslene@gmail.com> | 2014-03-30 10:12:42 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-03-30 10:12:42 +0800 |
commit | 41ca0ed30212367389099cfefa41587ec80d85f5 (patch) | |
tree | 3b63158a2381f11755c31e43d4628b05be8bce58 | |
parent | 105f97e61ce3d9f2bc8ce178d0ffcbf531bd91b3 (diff) | |
download | gitea-41ca0ed30212367389099cfefa41587ec80d85f5.tar.gz gitea-41ca0ed30212367389099cfefa41587ec80d85f5.zip |
remove ctx.Repo.IsValid
-rw-r--r-- | routers/repo/issue.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 3506e90163..b2253e9f48 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -20,10 +20,6 @@ import ( ) func Issues(ctx *middleware.Context) { - if !ctx.Repo.IsValid { - ctx.Handle(404, "issue.Issues(invalid repo):", nil) - } - ctx.Data["Title"] = "Issues" ctx.Data["IsRepoToolbarIssues"] = true ctx.Data["IsRepoToolbarIssuesList"] = true @@ -80,10 +76,6 @@ func Issues(ctx *middleware.Context) { } func CreateIssue(ctx *middleware.Context, params martini.Params, form auth.CreateIssueForm) { - if !ctx.Repo.IsValid { - ctx.Handle(404, "issue.CreateIssue(invalid repo):", nil) - } - ctx.Data["Title"] = "Create issue" ctx.Data["IsRepoToolbarIssues"] = true ctx.Data["IsRepoToolbarIssuesList"] = false @@ -126,10 +118,6 @@ func CreateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat } func ViewIssue(ctx *middleware.Context, params martini.Params) { - if !ctx.Repo.IsValid { - ctx.Handle(404, "issue.ViewIssue(invalid repo):", nil) - } - index, err := base.StrTo(params["index"]).Int() if err != nil { ctx.Handle(404, "issue.ViewIssue", err) @@ -183,10 +171,6 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) { } func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.CreateIssueForm) { - if !ctx.Repo.IsValid { - ctx.Handle(404, "issue.UpdateIssue(invalid repo):", nil) - } - index, err := base.StrTo(params["index"]).Int() if err != nil { ctx.Handle(404, "issue.UpdateIssue", err) @@ -226,10 +210,6 @@ func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat } func Comment(ctx *middleware.Context, params martini.Params) { - if !ctx.Repo.IsValid { - ctx.Handle(404, "issue.Comment(invalid repo):", nil) - } - index, err := base.StrTo(ctx.Query("issueIndex")).Int64() if err != nil { ctx.Handle(404, "issue.Comment(get index)", err) |