Fix API for branches with slashes (#2096)

This commit is contained in:
Ethan Koenig authored and Lunny Xiao committed 2017-07-02 10:03:57 +08:00
1 parent fea902adc8
commit f99489d5c5
4 files changed
+54 -2

No files matched your search

+1 -1
View File
@@ -364,7 +364,7 @@ func RegisterRoutes(m *macaron.Macaron) {
Post(bind(api.CreateForkOption{}), repo.CreateFork)
m.Group("/branches", func() {
m.Get("", repo.ListBranches)
m.Get("/:branchname", repo.GetBranch)
m.Get("/*", context.RepoRef(), repo.GetBranch)
})
m.Group("/keys", func() {
m.Combo("").Get(repo.ListDeployKeys).