summaryrefslogtreecommitdiffstats
path: root/routers/repo/webhook.go
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-11-07 17:53:22 +0100
committerSandro Santilli <strk@kbt.io>2016-11-07 17:53:22 +0100
commitaadd7dcdc317c5e1665318b537162749514ac212 (patch)
tree5e4772ba6ca97dd7dca62325024ec4359b0636c0 /routers/repo/webhook.go
parentb3828e38a5fbb92a92bae11e1e126b87fbad09c8 (diff)
downloadgitea-aadd7dcdc317c5e1665318b537162749514ac212.tar.gz
gitea-aadd7dcdc317c5e1665318b537162749514ac212.zip
And others
Diffstat (limited to 'routers/repo/webhook.go')
-rw-r--r--routers/repo/webhook.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go
index 918c34016f..d18008b52e 100644
--- a/routers/repo/webhook.go
+++ b/routers/repo/webhook.go
@@ -134,9 +134,9 @@ func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
return
}
- contentType := models.JSON
- if models.HookContentType(form.ContentType) == models.FORM {
- contentType = models.FORM
+ contentType := models.ContentTypeJson
+ if models.HookContentType(form.ContentType) == models.ContentTypeForm {
+ contentType = models.ContentTypeForm
}
w := &models.Webhook{
@@ -192,7 +192,7 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) {
w := &models.Webhook{
RepoID: orCtx.RepoID,
URL: form.PayloadURL,
- ContentType: models.JSON,
+ ContentType: models.ContentTypeJson,
HookEvent: ParseHookEvent(form.WebhookForm),
IsActive: form.Active,
HookTaskType: models.SLACK,
@@ -281,9 +281,9 @@ func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) {
return
}
- contentType := models.JSON
- if models.HookContentType(form.ContentType) == models.FORM {
- contentType = models.FORM
+ contentType := models.ContentTypeJson
+ if models.HookContentType(form.ContentType) == models.ContentTypeForm {
+ contentType = models.ContentTypeForm
}
w.URL = form.PayloadURL