aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-21 15:44:35 -0500
committerUnknwon <u@gogs.io>2017-02-21 15:44:35 -0500
commitbd970b8b27d648b3beff5cdec2f509826df0bb14 (patch)
tree25ee3516716ffd02864bacc60b85930a73db2bc2 /routers/api/v1
parent0f3155660ebecdc4fd3e453a59b4e0f474d5e33c (diff)
webhook: only trigger specific webhook for test delivery (#3030)
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/repo/hook.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go
index 9857d2eb..fa66fe47 100644
--- a/routers/api/v1/repo/hook.go
+++ b/routers/api/v1/repo/hook.go
@@ -99,7 +99,7 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) {
// https://github.com/gogits/go-gogs-client/wiki/Repositories#edit-a-hook
func EditHook(ctx *context.APIContext, form api.EditHookOption) {
- w, err := models.GetWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
+ w, err := models.GetWebhookOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrWebhookNotExist(err) {
ctx.Status(404)