aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/api/v1/api.go')
-rw-r--r--internal/route/api/v1/api.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/route/api/v1/api.go b/internal/route/api/v1/api.go
index b54a6dff..98394049 100644
--- a/internal/route/api/v1/api.go
+++ b/internal/route/api/v1/api.go
@@ -271,7 +271,10 @@ func RegisterRoutes(m *macaron.Macaron) {
}, reqRepoAdmin())
m.Get("/raw/*", context.RepoRef(), repo.GetRawFile)
- m.Get("/contents/*", repo.GetContents)
+ m.Group("/contents", func() {
+ m.Get("", repo.GetContents)
+ m.Get("/*", repo.GetContents)
+ })
m.Get("/archive/*", repo.GetArchive)
m.Group("/git/trees", func() {
m.Get("/:sha", repo.GetRepoGitTree)