diff options
author | Unknwon <u@gogs.io> | 2017-02-18 00:54:56 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-18 00:54:56 -0500 |
commit | a07b1f630aee4deb82623ef05b8b236f2b0c09df (patch) | |
tree | d15b0235a9f51ebe2993024abe6255e9b107b4cc /cmd | |
parent | 266586e8667705822acd136e4e566b4d19a54d73 (diff) |
webhook: add native Discord support
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -407,9 +407,11 @@ func runWeb(ctx *cli.Context) error { 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.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) m.Get("/:id", repo.WebHooksEdit) m.Post("/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) + m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) }) m.Route("/delete", "GET,POST", org.SettingsDelete) @@ -457,10 +459,12 @@ func runWeb(ctx *cli.Context) error { 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.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) m.Get("/:id", repo.WebHooksEdit) m.Post("/:id/test", repo.TestWebhook) m.Post("/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) + m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) m.Group("/git", func() { m.Get("", repo.SettingsGitHooks) |