summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-11-04 01:23:59 +0200
committerGitHub <noreply@github.com>2017-11-04 01:23:59 +0200
commit08b124dd47e5be365ac843031ed3ea73d1fbc151 (patch)
tree7e818a82feb5c0606be99d56cce9f7109b999473 /routers
parente6bb8e7a4da2c4e10b54099756192351ff20b677 (diff)
downloadgitea-08b124dd47e5be365ac843031ed3ea73d1fbc151.tar.gz
gitea-08b124dd47e5be365ac843031ed3ea73d1fbc151.zip
Fix API raw requests for commits and tags (#2841)
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 79ae5799e3..4331929614 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -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)