parent
78e6b21c1a
commit
c0015979a6
8 changed files with 450 additions and 78 deletions
|
@ -1222,6 +1222,13 @@ func Routes(ctx gocontext.Context) *web.Route {
|
|||
m.Post("/{username}/{reponame}", admin.AdoptRepository)
|
||||
m.Delete("/{username}/{reponame}", admin.DeleteUnadoptedRepository)
|
||||
})
|
||||
m.Group("/hooks", func() {
|
||||
m.Combo("").Get(admin.ListHooks).
|
||||
Post(bind(api.CreateHookOption{}), admin.CreateHook)
|
||||
m.Combo("/{id}").Get(admin.GetHook).
|
||||
Patch(bind(api.EditHookOption{}), admin.EditHook).
|
||||
Delete(admin.DeleteHook)
|
||||
})
|
||||
}, reqToken(auth_model.AccessTokenScopeSudo), reqSiteAdmin())
|
||||
|
||||
m.Group("/topics", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue