summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/webhook.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go
index b2274033b0..22d5cfd2c6 100644
--- a/routers/repo/webhook.go
+++ b/routers/repo/webhook.go
@@ -384,8 +384,8 @@ func TestWebhook(ctx *context.Context) {
}
func DeleteWebhook(ctx *context.Context) {
- if err := models.DeleteWebhook(ctx.QueryInt64("id")); err != nil {
- ctx.Flash.Error("DeleteWebhook: " + err.Error())
+ if err := models.DeleteWebhookByRepoID(ctx.Repo.Repository.ID, ctx.QueryInt64("id")); err != nil {
+ ctx.Flash.Error("DeleteWebhookByRepoID: " + err.Error())
} else {
ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success"))
}