Handle setting default branch via API (#9030)
This commit is contained in:
parent
86cff86b46
commit
184e47f6ce
2 changed files with 13 additions and 1 deletions
|
@ -606,7 +606,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
m.Group("/:username/:reponame", func() {
|
||||
m.Combo("").Get(reqAnyRepoReader(), repo.Get).
|
||||
Delete(reqToken(), reqOwner(), repo.Delete).
|
||||
Patch(reqToken(), reqAdmin(), bind(api.EditRepoOption{}), repo.Edit)
|
||||
Patch(reqToken(), reqAdmin(), bind(api.EditRepoOption{}), context.RepoRef(), repo.Edit)
|
||||
m.Group("/hooks", func() {
|
||||
m.Combo("").Get(repo.ListHooks).
|
||||
Post(bind(api.CreateHookOption{}), repo.CreateHook)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue