summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorRichard Mahn <richmahn@users.noreply.github.com>2019-06-29 16:51:10 -0400
committertechknowlogick <techknowlogick@gitea.io>2019-06-29 16:51:10 -0400
commitcd96dee9822c8b744526ba862fd8b5ec0e2c30ff (patch)
treed7bbf2f2b7adf80b17f3ab3971ae49bae7b010c4 /routers/api/v1/api.go
parent738285a4aac5df2e60f4038aa79be3e9fe921bdb (diff)
downloadgitea-cd96dee9822c8b744526ba862fd8b5ec0e2c30ff.tar.gz
gitea-cd96dee9822c8b744526ba862fd8b5ec0e2c30ff.zip
Fixes #7292 - API File Contents bug (#7301)
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 2268c1be38..8e7a74eca2 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -766,7 +766,8 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/tags/:sha", context.RepoRef(), repo.GetTag)
}, reqRepoReader(models.UnitTypeCode))
m.Group("/contents", func() {
- m.Get("/*", repo.GetFileContents)
+ m.Get("", repo.GetContentsList)
+ m.Get("/*", repo.GetContents)
m.Group("/*", func() {
m.Post("", bind(api.CreateFileOptions{}), repo.CreateFile)
m.Put("", bind(api.UpdateFileOptions{}), repo.UpdateFile)