1
0
Fork 0
forked from forgejo/forgejo

API endpoints for forks (#509)

This commit is contained in:
Ethan Koenig 2016-12-30 20:15:45 -05:00 committed by Lunny Xiao
parent 527c2dd665
commit b75450ad36
4 changed files with 104 additions and 3 deletions

View file

@ -276,6 +276,8 @@ func RegisterRoutes(m *macaron.Macaron) {
})
m.Get("/raw/*", context.RepoRef(), repo.GetRawFile)
m.Get("/archive/*", repo.GetArchive)
m.Combo("/forks").Get(repo.ListForks).
Post(bind(api.CreateForkOption{}), repo.CreateFork)
m.Group("/branches", func() {
m.Get("", repo.ListBranches)
m.Get("/:branchname", repo.GetBranch)