aboutsummaryrefslogtreecommitdiff
path: root/routers/web/org/setting.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/org/setting.go')
-rw-r--r--routers/web/org/setting.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go
index f713d0966..b57ebfbcd 100644
--- a/routers/web/org/setting.go
+++ b/routers/web/org/setting.go
@@ -218,9 +218,9 @@ func Webhooks(ctx *context.Context) {
ctx.Data["BaseLinkNew"] = ctx.Org.OrgLink + "/settings/hooks"
ctx.Data["Description"] = ctx.Tr("org.settings.hooks_desc")
- ws, err := webhook.ListWebhooksByOpts(ctx, &webhook.ListWebhookOptions{OrgID: ctx.Org.Organization.ID})
+ ws, err := webhook.ListWebhooksByOpts(ctx, &webhook.ListWebhookOptions{OwnerID: ctx.Org.Organization.ID})
if err != nil {
- ctx.ServerError("GetWebhooksByOrgId", err)
+ ctx.ServerError("ListWebhooksByOpts", err)
return
}
@@ -230,8 +230,8 @@ func Webhooks(ctx *context.Context) {
// DeleteWebhook response for delete webhook
func DeleteWebhook(ctx *context.Context) {
- if err := webhook.DeleteWebhookByOrgID(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil {
- ctx.Flash.Error("DeleteWebhookByOrgID: " + err.Error())
+ if err := webhook.DeleteWebhookByOwnerID(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil {
+ ctx.Flash.Error("DeleteWebhookByOwnerID: " + err.Error())
} else {
ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success"))
}