Make URL scheme unambiguous (#2408)

* Make URL scheme unambiguous

Redirect old routes to new routes

* Fix redirects to new URL scheme, and update template

* Fix branches/_new endpoints, and update integration test
This commit is contained in:
Ethan Koenig 2017-10-29 19:04:25 -07:00 committed by Lunny Xiao
parent 6e98812ecf
commit 513375c429
20 changed files with 279 additions and 144 deletions

View file

@ -391,7 +391,7 @@ func RegisterRoutes(m *macaron.Macaron) {
Post(reqToken(), bind(api.CreateForkOption{}), repo.CreateFork)
m.Group("/branches", func() {
m.Get("", repo.ListBranches)
m.Get("/*", context.RepoRef(), repo.GetBranch)
m.Get("/*", context.RepoRefByType(context.RepoRefBranch), repo.GetBranch)
})
m.Group("/keys", func() {
m.Combo("").Get(repo.ListDeployKeys).