diff options
author | Unknwon <u@gogs.io> | 2016-03-13 23:20:22 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-13 23:20:22 -0400 |
commit | 9bd9ad420582a7a34d18011847bb789f64271b1f (patch) | |
tree | 05b1191897ed5f56395faacd3c8bf1ab00a14c9c /routers/api/v1/repo/hooks.go | |
parent | dd6faf7f9bd0a1dbf986e124ea0f4db249e1da48 (diff) |
#1692 add CRUD issue APIs
- Fix go-gogs-client#10
- Related to #809
Diffstat (limited to 'routers/api/v1/repo/hooks.go')
-rw-r--r-- | routers/api/v1/repo/hooks.go | 7 |
1 files changed, 3 insertions, 4 deletions
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)) } |