aboutsummaryrefslogtreecommitdiffstats
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.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go
index 277ff9d973..d8add77f66 100644
--- a/routers/web/org/setting.go
+++ b/routers/web/org/setting.go
@@ -11,6 +11,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/webhook"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
@@ -187,7 +188,7 @@ func Webhooks(ctx *context.Context) {
ctx.Data["BaseLinkNew"] = ctx.Org.OrgLink + "/settings/hooks"
ctx.Data["Description"] = ctx.Tr("org.settings.hooks_desc")
- ws, err := models.ListWebhooksByOpts(&models.ListWebhookOptions{OrgID: ctx.Org.Organization.ID})
+ ws, err := webhook.ListWebhooksByOpts(&webhook.ListWebhookOptions{OrgID: ctx.Org.Organization.ID})
if err != nil {
ctx.ServerError("GetWebhooksByOrgId", err)
return
@@ -199,7 +200,7 @@ func Webhooks(ctx *context.Context) {
// DeleteWebhook response for delete webhook
func DeleteWebhook(ctx *context.Context) {
- if err := models.DeleteWebhookByOrgID(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil {
+ if err := webhook.DeleteWebhookByOrgID(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil {
ctx.Flash.Error("DeleteWebhookByOrgID: " + err.Error())
} else {
ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success"))