mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:10:50 +00:00
api: delete repository webhooks (#3275)
Allows the deletion of a webhook from a repository at the /:user/:repo/hooks/:id endpoint. Solves drone/drone issue #1603. Signed-off-by: Dennis Chen <barracks510@gmail.com>
This commit is contained in:
parent
eac32419fc
commit
5ff2dfb23e
2 changed files with 15 additions and 3 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue