Set correct content_type value for Gogs/Gitea webhooks (#9504) (#10456)

The content_type value was defaulting to the string value of the
ContentType, not the integer value as expected by the backend.
tokarchuk/v1.17
Jeff Stein 5 years ago committed by GitHub
parent ae4eaf02be
commit e661cd0321
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      templates/repo/settings/webhook/gitea.tmpl
  2. 2
      templates/repo/settings/webhook/gogs.tmpl

@ -21,7 +21,7 @@
<div class="field">
<label>{{.i18n.Tr "repo.settings.content_type"}}</label>
<div class="ui selection dropdown">
<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}">
<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}1{{end}}">
<div class="default text"></div>
<i class="dropdown icon"></i>
<div class="menu">

@ -9,7 +9,7 @@
<div class="field">
<label>{{.i18n.Tr "repo.settings.content_type"}}</label>
<div class="ui selection dropdown">
<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}">
<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}1{{end}}">
<div class="default text"></div>
<i class="dropdown icon"></i>
<div class="menu">

Loading…
Cancel
Save