From 15d3872281044cfd7aeaf17dae66f6b89078a55e Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 29 Aug 2017 09:20:35 +0800 Subject: [PATCH] fix missing orgnization discord webhook (#2414) --- routers/repo/webhook.go | 1 - routers/routes/routes.go | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index ade40649b..58412997d 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -104,7 +104,6 @@ func WebhooksNew(ctx *context.Context) { ctx.Data["DiscordHook"] = map[string]interface{}{ "Username": "Gitea", "IconURL": setting.AppURL + "img/favicon.png", - "Color": 16724530, } } ctx.Data["BaseLink"] = orCtx.Link diff --git a/routers/routes/routes.go b/routers/routes/routes.go index c619c8b5a..a542094d0 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -396,10 +396,12 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost) m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost) m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost) + m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) 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.Route("/delete", "GET,POST", org.SettingsDelete)