mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 18:05:19 +02:00
And others
This commit is contained in:
parent
b3828e38a5
commit
aadd7dcdc3
12 changed files with 34 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue