diff options
author | Unknwon <u@gogs.io> | 2016-08-08 11:29:50 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-08 11:29:50 -0700 |
commit | b73318bc62941b58064fca02b67d589718309155 (patch) | |
tree | f56c6e9fdef9ff9f8d34bd81ad6cb44b1567d8ac /cmd | |
parent | e5bf4281b5519d845dd85a153831ba5cc1117590 (diff) | |
download | gitea-b73318bc62941b58064fca02b67d589718309155.tar.gz gitea-b73318bc62941b58064fca02b67d589718309155.zip |
Fix 404 when comment on pulls and not using interal issue tracker
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go index 1ce5acc783..5236ceec45 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -453,7 +453,6 @@ func runWeb(ctx *cli.Context) error { m.Combo("/new").Get(context.RepoRef(), repo.NewIssue). Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost) - m.Combo("/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment) m.Group("/:index", func() { m.Post("/label", repo.UpdateIssueLabel) m.Post("/milestone", repo.UpdateIssueMilestone) @@ -465,6 +464,9 @@ func runWeb(ctx *cli.Context) error { m.Post("/content", repo.UpdateIssueContent) }) }, repo.MustEnableIssues) + // FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest. + // So they can apply their own enable/disable logic on routers. + m.Combo("/issues/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment) m.Group("/comments/:id", func() { m.Post("", repo.UpdateCommentContent) m.Post("/delete", repo.DeleteComment) |