From 22717a1c064511cf37c46af5e650baf7184cf25b Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sun, 22 Mar 2020 22:07:22 +0800 Subject: webhook: overhaul route handlers (#6002) * Overual route handlers and fixes #5366 * Merge routes for repo and org * Inject OrgRepoContext * DRY validateWebhook * DRY c.HasError * Add tests * Update CHANGELOG --- internal/route/api/v1/convert/convert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/route/api/v1') diff --git a/internal/route/api/v1/convert/convert.go b/internal/route/api/v1/convert/convert.go index 027bebbc..a374efc1 100644 --- a/internal/route/api/v1/convert/convert.go +++ b/internal/route/api/v1/convert/convert.go @@ -75,7 +75,7 @@ func ToHook(repoLink string, w *db.Webhook) *api.Hook { "content_type": w.ContentType.Name(), } if w.HookTaskType == db.SLACK { - s := w.GetSlackHook() + s := w.SlackMeta() config["channel"] = s.Channel config["username"] = s.Username config["icon_url"] = s.IconURL -- cgit v1.2.3