diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2018-04-28 23:21:33 -0700 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-04-29 14:21:33 +0800 |
commit | 7ea4bfc56172faf588142ee5637f35c0344f7534 (patch) | |
tree | f4d47e2d4209b90d340dead5e3abb7b4a02cb475 /routers/api/v1/api.go | |
parent | 5a62eb30df3a04e76e465824f525b4ffd920b562 (diff) | |
download | gitea-7ea4bfc56172faf588142ee5637f35c0344f7534.tar.gz gitea-7ea4bfc56172faf588142ee5637f35c0344f7534.zip |
API endpoint for testing webhook (#3550)
* API endpoint for testing webhook
* Empty commit to rerun CI
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 02606bdfd0..eec55cac67 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -382,9 +382,12 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/hooks", func() { m.Combo("").Get(repo.ListHooks). Post(bind(api.CreateHookOption{}), repo.CreateHook) - m.Combo("/:id").Get(repo.GetHook). - Patch(bind(api.EditHookOption{}), repo.EditHook). - Delete(repo.DeleteHook) + m.Group("/:id", func() { + m.Combo("").Get(repo.GetHook). + Patch(bind(api.EditHookOption{}), repo.EditHook). + Delete(repo.DeleteHook) + m.Post("/tests", context.RepoRef(), repo.TestHook) + }) }, reqToken(), reqRepoWriter()) m.Group("/collaborators", func() { m.Get("", repo.ListCollaborators) |