Modify router to handle system webhooks and default ones

This commit is contained in:
James Lakin
2020-03-01 15:07:25 +00:00
parent 1decbb5b27
commit c35b7acafa
2 changed files with 21 additions and 9 deletions
+2 -2
View File
@@ -453,8 +453,8 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/delete", admin.DeleteRepo)
})
m.Group("/hooks", func() {
m.Get("", admin.DefaultWebhooks)
m.Group("/^:type(hooks|system-hooks)$", func() {
m.Get("", admin.DefaultAndSystemWebhooks)
m.Post("/delete", admin.DeleteDefaultWebhook)
m.Get("/:type/new", repo.WebhooksNew)
m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)