diff options
author | techknowlogick <matti@mdranta.net> | 2019-04-18 22:45:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 22:45:02 -0400 |
commit | 56da256853001cf3538b8d4ae99798e084935a90 (patch) | |
tree | cdbd686d31750aa89365635eb96705c5a9fc1efc /routers/routes | |
parent | 6dbd26185203d464c4a4e32e7af04a34f37ae4f2 (diff) | |
download | gitea-56da256853001cf3538b8d4ae99798e084935a90.tar.gz gitea-56da256853001cf3538b8d4ae99798e084935a90.zip |
Telegram webhook (#4227)
Diffstat (limited to 'routers/routes')
-rw-r--r-- | routers/routes/routes.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go index e42222be88..874d6494cb 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -559,12 +559,14 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost) m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) m.Post("/dingtalk/new", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) + m.Post("/telegram/new", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksNewPost) m.Get("/:id", repo.WebHooksEdit) m.Post("/gitea/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) m.Post("/gogs/:id", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksEditPost) m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) m.Post("/dingtalk/:id", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) + m.Post("/telegram/:id", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksEditPost) }) m.Route("/delete", "GET,POST", org.SettingsDelete) @@ -612,6 +614,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost) m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) m.Post("/dingtalk/new", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) + m.Post("/telegram/new", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksNewPost) m.Get("/:id", repo.WebHooksEdit) m.Post("/:id/test", repo.TestWebhook) m.Post("/gitea/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) @@ -619,6 +622,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) m.Post("/dingtalk/:id", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) + m.Post("/telegram/:id", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksEditPost) m.Group("/git", func() { m.Get("", repo.GitHooks) |