diff options
author | Unknwon <u@gogs.io> | 2015-08-27 01:04:23 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-27 01:04:23 +0800 |
commit | c08600c59b8fb8d5f03fadacddb1140bc994ae94 (patch) | |
tree | 29be86d5e607203d9ba68e0af58ae04c4cea0ea1 /cmd | |
parent | 4217c2333cf9ac29af611df9826cc4b5198241fe (diff) | |
download | gitea-c08600c59b8fb8d5f03fadacddb1140bc994ae94.tar.gz gitea-c08600c59b8fb8d5f03fadacddb1140bc994ae94.zip |
new edit webhook UI
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/cmd/web.go b/cmd/web.go index 03b34befaa..cf681fbcb3 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -414,11 +414,11 @@ func runWeb(ctx *cli.Context) { 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("/:id", repo.WebHooksEdit) + m.Post("/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) + m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) }) - 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) m.Route("/delete", "GET,POST", org.SettingsDelete) }) @@ -452,18 +452,17 @@ func runWeb(ctx *cli.Context) { 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("/:id", repo.WebHooksEdit) + m.Post("/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) + m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) + + m.Group("/git", func() { + m.Get("", repo.GitHooks) + m.Combo("/:name").Get(repo.GitHooksEdit). + Post(repo.GitHooksEditPost) + }, middleware.GitHookService()) }) - 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) - - m.Group("/hooks/git", func() { - m.Get("", repo.GitHooks) - m.Combo("/:name").Get(repo.GitHooksEdit). - Post(repo.GitHooksEditPost) - }, middleware.GitHookService()) - m.Group("/keys", func() { m.Combo("").Get(repo.DeployKeys). Post(bindIgnErr(auth.AddSSHKeyForm{}), repo.DeployKeysPost) |