Browse Source

Fix 404 when comment on pulls and not using interal issue tracker

pull/3403/head
Unknwon 8 years ago
parent
commit
b73318bc62
  1. 4
      cmd/web.go
  2. 2
      gogs.go
  3. 2
      templates/.VERSION

4
cmd/web.go

@ -453,7 +453,6 @@ func runWeb(ctx *cli.Context) error {
m.Combo("/new").Get(context.RepoRef(), repo.NewIssue). m.Combo("/new").Get(context.RepoRef(), repo.NewIssue).
Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost) Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost)
m.Combo("/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment)
m.Group("/:index", func() { m.Group("/:index", func() {
m.Post("/label", repo.UpdateIssueLabel) m.Post("/label", repo.UpdateIssueLabel)
m.Post("/milestone", repo.UpdateIssueMilestone) m.Post("/milestone", repo.UpdateIssueMilestone)
@ -465,6 +464,9 @@ func runWeb(ctx *cli.Context) error {
m.Post("/content", repo.UpdateIssueContent) m.Post("/content", repo.UpdateIssueContent)
}) })
}, repo.MustEnableIssues) }, 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.Group("/comments/:id", func() {
m.Post("", repo.UpdateCommentContent) m.Post("", repo.UpdateCommentContent)
m.Post("/delete", repo.DeleteComment) m.Post("/delete", repo.DeleteComment)

2
gogs.go

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )
const APP_VER = "0.9.67.0806" const APP_VER = "0.9.67.0807"
func init() { func init() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())

2
templates/.VERSION

@ -1 +1 @@
0.9.67.0806 0.9.67.0807
Loading…
Cancel
Save