diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-03-22 22:07:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 22:07:22 +0800 |
commit | 22717a1c064511cf37c46af5e650baf7184cf25b (patch) | |
tree | f98bb991145605567f8b43506a7add855db0a90f /internal/db | |
parent | 82e511ddb1d1e98ebe6b1931766b0835fc066883 (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/db')
-rw-r--r-- | internal/db/webhook.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/webhook.go b/internal/db/webhook.go index cce7e3e6..080b73fd 100644 --- a/internal/db/webhook.go +++ b/internal/db/webhook.go @@ -136,10 +136,10 @@ func (w *Webhook) AfterSet(colName string, _ xorm.Cell) { } } -func (w *Webhook) GetSlackHook() *SlackMeta { +func (w *Webhook) SlackMeta() *SlackMeta { s := &SlackMeta{} if err := jsoniter.Unmarshal([]byte(w.Meta), s); err != nil { - log.Error("GetSlackHook [%d]: %v", w.ID, err) + log.Error("Failed to get Slack meta [webhook_id: %d]: %v", w.ID, err) } return s } |