summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/utils
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/api/v1/utils
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/api/v1/utils')
-rw-r--r--routers/api/v1/utils/hook.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/v1/utils/hook.go b/routers/api/v1/utils/hook.go
index da15850ec5..92846c5f2a 100644
--- a/routers/api/v1/utils/hook.go
+++ b/routers/api/v1/utils/hook.go
@@ -98,6 +98,7 @@ func addHook(ctx *context.APIContext, form *api.CreateHookOption, orgID, repoID
URL: form.Config["url"],
ContentType: models.ToHookContentType(form.Config["content_type"]),
Secret: form.Config["secret"],
+ HTTPMethod: "POST",
HookEvent: &models.HookEvent{
ChooseEvents: true,
HookEvents: models.HookEvents{