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 /routers/repo/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 'routers/repo/webhook.go')
-rw-r--r-- | routers/repo/webhook.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index d18008b52e..931ec1185f 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -23,9 +23,9 @@ import ( ) const ( - HOOKS base.TplName = "repo/settings/hooks" - HookNew base.TplName = "repo/settings/hook_new" - ORG_HookNew base.TplName = "org/settings/hook_new" + tplHooks base.TplName = "repo/settings/hooks" + tplHookNew base.TplName = "repo/settings/hook_new" + tplOrgHookNew base.TplName = "org/settings/hook_new" ) func Webhooks(ctx *context.Context) { @@ -41,7 +41,7 @@ func Webhooks(ctx *context.Context) { } ctx.Data["Webhooks"] = ws - ctx.HTML(200, HOOKS) + ctx.HTML(200, tplHooks) } type OrgRepoCtx struct { @@ -57,7 +57,7 @@ func getOrgRepoCtx(ctx *context.Context) (*OrgRepoCtx, error) { return &OrgRepoCtx{ RepoID: ctx.Repo.Repository.ID, Link: ctx.Repo.RepoLink, - NewTemplate: HookNew, + NewTemplate: tplHookNew, }, nil } @@ -65,7 +65,7 @@ func getOrgRepoCtx(ctx *context.Context) (*OrgRepoCtx, error) { return &OrgRepoCtx{ OrgID: ctx.Org.Organization.ID, Link: ctx.Org.OrgLink, - NewTemplate: ORG_HookNew, + NewTemplate: tplOrgHookNew, }, nil } @@ -134,7 +134,7 @@ func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) { return } - contentType := models.ContentTypeJson + contentType := models.ContentTypeJSON if models.HookContentType(form.ContentType) == models.ContentTypeForm { contentType = models.ContentTypeForm } @@ -192,7 +192,7 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) { w := &models.Webhook{ RepoID: orCtx.RepoID, URL: form.PayloadURL, - ContentType: models.ContentTypeJson, + ContentType: models.ContentTypeJSON, HookEvent: ParseHookEvent(form.WebhookForm), IsActive: form.Active, HookTaskType: models.SLACK, @@ -281,7 +281,7 @@ func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) { return } - contentType := models.ContentTypeJson + contentType := models.ContentTypeJSON if models.HookContentType(form.ContentType) == models.ContentTypeForm { contentType = models.ContentTypeForm } |