Fix API raw requests for commits and tags (#2841)

This commit is contained in:
Lauris BH
2017-11-04 01:23:59 +02:00
committed by GitHub
parent e6bb8e7a4d
commit 08b124dd47
3 changed files with 33 additions and 2 deletions

View File

@ -385,7 +385,7 @@ func RegisterRoutes(m *macaron.Macaron) {
Put(bind(api.AddCollaboratorOption{}), repo.AddCollaborator).
Delete(repo.DeleteCollaborator)
}, reqToken())
m.Get("/raw/*", context.RepoRef(), repo.GetRawFile)
m.Get("/raw/*", context.RepoRefByType(context.RepoRefAny), repo.GetRawFile)
m.Get("/archive/*", repo.GetArchive)
m.Combo("/forks").Get(repo.ListForks).
Post(reqToken(), bind(api.CreateForkOption{}), repo.CreateFork)