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"
This commit is contained in:
parent
c8c748aea6
commit
864d1b1f9f
10 changed files with 99 additions and 99 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue