summaryrefslogtreecommitdiffstats
path: root/routers/repo/webhook.go
diff options
context:
space:
mode:
authortechknowlogick <matti@mdranta.net>2019-05-15 08:01:53 -0400
committerLunny Xiao <xiaolunwen@gmail.com>2019-05-15 20:01:53 +0800
commit5fb1ad70113d3272232c266b4ff58e9f7f646594 (patch)
tree6264cc7cba7fbff0d12b638764d4f77d07db6707 /routers/repo/webhook.go
parent710245e81e0d65c72231dbb3b5c9f860cdc71899 (diff)
downloadgitea-5fb1ad70113d3272232c266b4ff58e9f7f646594.tar.gz
gitea-5fb1ad70113d3272232c266b4ff58e9f7f646594.zip
Webhook Logs show proper HTTP Method, and allow change HTTP method in form (#6953)
* Fix #6951 - logs show proper HTTP Method, and allow change HTTP method in form * enforce POST method for webhook * set default if method is empty
Diffstat (limited to 'routers/repo/webhook.go')
-rw-r--r--routers/repo/webhook.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go
index 7695f208ce..8daf721b50 100644
--- a/routers/repo/webhook.go
+++ b/routers/repo/webhook.go
@@ -564,6 +564,7 @@ func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) {
w.Secret = form.Secret
w.HookEvent = ParseHookEvent(form.WebhookForm)
w.IsActive = form.Active
+ w.HTTPMethod = form.HTTPMethod
if err := w.UpdateEvent(); err != nil {
ctx.ServerError("UpdateEvent", err)
return