Fixes #7292 - API File Contents bug (#7301)

This commit is contained in:
Richard Mahn 2019-06-29 16:51:10 -04:00 committed by techknowlogick
parent 738285a4aa
commit cd96dee982
17 changed files with 963 additions and 335 deletions

View file

@ -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)