Browse Source

fix panic on gogs webhook creation (#2675)

* fix panic on gogs webhook creation

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* fix panic in gogs webhook edit

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
tags/v1.3.0-rc1
David Schneiderbauer Lunny Xiao 7 years ago
parent
commit
75bb4887b6
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      routers/repo/webhook.go

+ 2
- 2
routers/repo/webhook.go View File

@@ -174,7 +174,7 @@ func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
}

// GogsHooksNewPost response for creating webhook
func GogsHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
func GogsHooksNewPost(ctx *context.Context, form auth.NewGogshookForm) {
ctx.Data["Title"] = ctx.Tr("repo.settings.add_webhook")
ctx.Data["PageIsSettingsHooks"] = true
ctx.Data["PageIsSettingsHooksNew"] = true
@@ -420,7 +420,7 @@ func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) {
}

// GogsHooksEditPost response for editing gogs hook
func GogsHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) {
func GogsHooksEditPost(ctx *context.Context, form auth.NewGogshookForm) {
ctx.Data["Title"] = ctx.Tr("repo.settings.update_webhook")
ctx.Data["PageIsSettingsHooks"] = true
ctx.Data["PageIsSettingsHooksEdit"] = true


Loading…
Cancel
Save