diff --git a/routers/web/web.go b/routers/web/web.go index b2677f1a65..ec7f6749bf 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -613,9 +613,9 @@ func registerRoutes(m *web.Route) { m.Post("/{type}/new", repo_setting.WebhookCreate) m.Group("/{id}", func() { m.Get("", repo_setting.WebHooksEdit) + m.Post("", repo_setting.WebhookUpdate) m.Post("/replay/{uuid}", repo_setting.ReplayWebhook) }) - m.Post("/{type}/{id:[0-9]+}", repo_setting.WebhookUpdate) }, webhooksEnabled) m.Group("/blocked_users", func() { @@ -715,9 +715,9 @@ func registerRoutes(m *web.Route) { m.Post("/delete", admin.DeleteDefaultOrSystemWebhook) m.Group("/{id}", func() { m.Get("", repo_setting.WebHooksEdit) + m.Post("", repo_setting.WebhookUpdate) m.Post("/replay/{uuid}", repo_setting.ReplayWebhook) }) - m.Post("/{type}/{id:[0-9]+}", repo_setting.WebhookUpdate) }, webhooksEnabled) m.Group("/{configType:default-hooks|system-hooks}", func() { @@ -884,9 +884,9 @@ func registerRoutes(m *web.Route) { m.Post("/{type}/new", repo_setting.WebhookCreate) m.Group("/{id}", func() { m.Get("", repo_setting.WebHooksEdit) + m.Post("", repo_setting.WebhookUpdate) m.Post("/replay/{uuid}", repo_setting.ReplayWebhook) }) - m.Post("/{type}/{id:[0-9]+}", repo_setting.WebhookUpdate) }, webhooksEnabled) m.Group("/labels", func() { @@ -1059,10 +1059,10 @@ func registerRoutes(m *web.Route) { m.Post("/{type}/new", repo_setting.WebhookCreate) m.Group("/{id}", func() { m.Get("", repo_setting.WebHooksEdit) + m.Post("", repo_setting.WebhookUpdate) m.Post("/test", repo_setting.TestWebhook) m.Post("/replay/{uuid}", repo_setting.ReplayWebhook) }) - m.Post("/{type}/{id:[0-9]+}", repo_setting.WebhookUpdate) }, webhooksEnabled) m.Group("/keys", func() { diff --git a/templates/repo/settings/webhook/dingtalk.tmpl b/templates/repo/settings/webhook/dingtalk.tmpl index 0ba99e98ee..f1cd6a1932 100644 --- a/templates/repo/settings/webhook/dingtalk.tmpl +++ b/templates/repo/settings/webhook/dingtalk.tmpl @@ -1,6 +1,6 @@ {{if eq .HookType "dingtalk"}}
{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://dingtalk.com" (ctx.Locale.Tr "repo.settings.web_hook_name_dingtalk")}}
-