aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-03-22 22:07:22 +0800
committerGitHub <noreply@github.com>2020-03-22 22:07:22 +0800
commit22717a1c064511cf37c46af5e650baf7184cf25b (patch)
treef98bb991145605567f8b43506a7add855db0a90f /internal/route/api
parent82e511ddb1d1e98ebe6b1931766b0835fc066883 (diff)
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
Diffstat (limited to 'internal/route/api')
-rw-r--r--internal/route/api/v1/convert/convert.go2
1 files changed, 1 insertions, 1 deletions
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