From 3d93532c87823159dd03e9c64a58c7bafed0fa64 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 16 Jul 2016 01:02:55 +0800 Subject: #3274 fix can't get webhook detail of organization --- routers/api/v1/repo/hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/api/v1/repo') diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index 0dac8f7c..0bf46977 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -98,7 +98,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.GetWebhookByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")) + w, err := models.GetWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")) if err != nil { if models.IsErrWebhookNotExist(err) { ctx.Status(404) -- cgit v1.2.3