From 9bd9ad420582a7a34d18011847bb789f64271b1f Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 13 Mar 2016 23:20:22 -0400 Subject: #1692 add CRUD issue APIs - Fix go-gogs-client#10 - Related to #809 --- routers/api/v1/repo/hooks.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'routers/api/v1/repo/hooks.go') diff --git a/routers/api/v1/repo/hooks.go b/routers/api/v1/repo/hooks.go index 840f258c..0cbe6762 100644 --- a/routers/api/v1/repo/hooks.go +++ b/routers/api/v1/repo/hooks.go @@ -26,9 +26,8 @@ func ListHooks(ctx *context.APIContext) { apiHooks := make([]*api.Hook, len(hooks)) for i := range hooks { - apiHooks[i] = convert.ToApiHook(ctx.Repo.RepoLink, hooks[i]) + apiHooks[i] = convert.ToHook(ctx.Repo.RepoLink, hooks[i]) } - ctx.JSON(200, &apiHooks) } @@ -94,7 +93,7 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) { return } - ctx.JSON(201, convert.ToApiHook(ctx.Repo.RepoLink, w)) + ctx.JSON(201, convert.ToHook(ctx.Repo.RepoLink, w)) } // https://github.com/gogits/go-gogs-client/wiki/Repositories#edit-a-hook @@ -161,5 +160,5 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) { return } - ctx.JSON(200, convert.ToApiHook(ctx.Repo.RepoLink, w)) + ctx.JSON(200, convert.ToHook(ctx.Repo.RepoLink, w)) } -- cgit v1.2.3