summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-09 09:39:55 -0700
committerUnknwon <u@gogs.io>2016-08-09 09:39:55 -0700
commitbbe866122db02c543cf4c72b0878ed1b08c8b07a (patch)
treed096a165ba9ce075ff8626afdbdd5507a9afe180 /cmd/web.go
parent87954dbfeb28a8e883e18123bf92a3bbcc839cd8 (diff)
downloadgitea-bbe866122db02c543cf4c72b0878ed1b08c8b07a.tar.gz
gitea-bbe866122db02c543cf4c72b0878ed1b08c8b07a.zip
#3406 fix regression of MustEnableIssues check
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 5236ceec45..48ff52110f 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -449,24 +449,24 @@ func runWeb(ctx *cli.Context) error {
m.Get("/:username/:reponame/action/:action", reqSignIn, context.RepoAssignment(), repo.Action)
m.Group("/:username/:reponame", func() {
+ // 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.Group("/issues", func() {
- m.Combo("/new").Get(context.RepoRef(), repo.NewIssue).
+ m.Combo("/new", repo.MustEnableIssues).Get(context.RepoRef(), repo.NewIssue).
Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost)
m.Group("/:index", func() {
m.Post("/label", repo.UpdateIssueLabel)
m.Post("/milestone", repo.UpdateIssueMilestone)
m.Post("/assignee", repo.UpdateIssueAssignee)
+ m.Combo("/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment)
}, reqRepoWriter)
m.Group("/:index", func() {
m.Post("/title", repo.UpdateIssueTitle)
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)