summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-27 00:30:06 +0800
committerUnknwon <u@gogs.io>2015-08-27 00:30:06 +0800
commit4217c2333cf9ac29af611df9826cc4b5198241fe (patch)
treed388e0ede4707c902a499937a31b67faa4c784c6 /cmd
parent28814564212b7c64136cc3eda3774af56983557e (diff)
downloadgitea-4217c2333cf9ac29af611df9826cc4b5198241fe.tar.gz
gitea-4217c2333cf9ac29af611df9826cc4b5198241fe.zip
new create webhook UI
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/web.go b/cmd/web.go
index c661c13063..03b34befaa 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -411,11 +411,11 @@ func runWeb(ctx *cli.Context) {
m.Group("/hooks", func() {
m.Get("", org.Webhooks)
m.Post("/delete", org.DeleteWebhook)
+ m.Get("/:type/new", repo.WebhooksNew)
+ m.Post("/gogs/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
+ m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
})
- m.Get("/hooks/new", repo.WebHooksNew)
- m.Post("/hooks/gogs/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
- m.Post("/hooks/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
m.Get("/hooks/:id", repo.WebHooksEdit)
m.Post("/hooks/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost)
m.Post("/hooks/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost)
@@ -449,10 +449,11 @@ func runWeb(ctx *cli.Context) {
m.Group("/hooks", func() {
m.Get("", repo.Webhooks)
m.Post("/delete", repo.DeleteWebhook)
+ m.Get("/:type/new", repo.WebhooksNew)
+ m.Post("/gogs/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
+ m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
})
- m.Get("/hooks/new", repo.WebHooksNew)
- m.Post("/hooks/gogs/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
- m.Post("/hooks/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
+
m.Get("/hooks/:id", repo.WebHooksEdit)
m.Post("/hooks/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost)
m.Post("/hooks/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost)