]> source.dussan.org Git - gitea.git/commitdiff
fix panic on gogs webhook creation (#2675)
authorDavid Schneiderbauer <daviian@users.noreply.github.com>
Sun, 8 Oct 2017 11:37:31 +0000 (13:37 +0200)
committerLunny Xiao <xiaolunwen@gmail.com>
Sun, 8 Oct 2017 11:37:31 +0000 (19:37 +0800)
* 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>
routers/repo/webhook.go

index 9c88b4385ef0fbbed9aefee2b410bca31d4d9a5b..81f79582ded409f09aa6df20c83ded527e7758df 100644 (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