diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-07 21:58:22 +0100 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2016-11-07 18:58:22 -0200 |
commit | 864d1b1f9f6a72589d77ec0f08b21c476b8e13d4 (patch) | |
tree | ce425602ac6e31e6b7d4bc65e9591849e9ec96f9 /models/webhook.go | |
parent | c8c748aea6a864c5cf8a2235d15f413188c0a22d (diff) | |
download | gitea-864d1b1f9f6a72589d77ec0f08b21c476b8e13d4.tar.gz gitea-864d1b1f9f6a72589d77ec0f08b21c476b8e13d4.zip |
Fix type in unused constant name (#111)
* Write LDAP, SMTP, PAM, DLDAP back to all uppercase
* Fix type in unused constant name
* Other MixCased fixes
* Complete MixerCasing of template constants
* Re uppercase LTS and LDAPS suffixes
* Uppercase JSON suffix in constant names
* Proper case LoginNoType
* Prefix unexported template path constants with "tpl"
Diffstat (limited to 'models/webhook.go')
-rw-r--r-- | models/webhook.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/webhook.go b/models/webhook.go index 25c9326e7c..eb37338d2c 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -28,12 +28,12 @@ var HookQueue = sync.NewUniqueQueue(setting.Webhook.QueueLength) type HookContentType int const ( - ContentTypeJson HookContentType = iota + 1 + ContentTypeJSON HookContentType = iota + 1 ContentTypeForm ) var hookContentTypes = map[string]HookContentType{ - "json": ContentTypeJson, + "json": ContentTypeJSON, "form": ContentTypeForm, } @@ -44,7 +44,7 @@ func ToHookContentType(name string) HookContentType { func (t HookContentType) Name() string { switch t { - case ContentTypeJson: + case ContentTypeJSON: return "json" case ContentTypeForm: return "form" @@ -511,7 +511,7 @@ func (t *HookTask) deliver() { SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify}) switch t.ContentType { - case ContentTypeJson: + case ContentTypeJSON: req = req.Header("Content-Type", "application/json").Body(t.PayloadContent) case ContentTypeForm: req.Param("payload", t.PayloadContent) |