aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/hooks.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/hooks.go')
-rw-r--r--routers/api/v1/repo/hooks.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/routers/api/v1/repo/hooks.go b/routers/api/v1/repo/hooks.go
index 840f258cf9..0cbe6762a8 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))
}