diff options
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 5050b8cb..f60bb58b 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -221,9 +221,12 @@ func RegisterRoutes(m *macaron.Macaron) { Delete(repo.Delete) m.Group("/:username/:reponame", func() { - m.Combo("/hooks").Get(repo.ListHooks). - Post(bind(api.CreateHookOption{}), repo.CreateHook) - m.Patch("/hooks/:id:int", bind(api.EditHookOption{}), repo.EditHook) + m.Group("/hooks", func() { + m.Combo("").Get(repo.ListHooks). + Post(bind(api.CreateHookOption{}), repo.CreateHook) + m.Combo("/:id:int").Patch(bind(api.EditHookOption{}), repo.EditHook). + Delete(repo.DeleteHook) + }) m.Get("/raw/*", context.RepoRef(), repo.GetRawFile) m.Get("/archive/*", repo.GetArchive) m.Group("/branches", func() { |