1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Add single release page and latest redirect (#11102)

* Add single release and latest release routes

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update API and move latest search to models

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix swagger

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
This commit is contained in:
John Olheiser
2020-04-18 09:47:15 -05:00
committed by GitHub
parent 1b86f174ce
commit 4f597b1866
6 changed files with 96 additions and 2 deletions

View File

@@ -805,7 +805,9 @@ func RegisterRoutes(m *macaron.Macaron) {
// Releases
m.Group("/:username/:reponame", func() {
m.Group("/releases", func() {
m.Get("/", repo.MustBeNotEmpty, repo.Releases)
m.Get("/", repo.Releases)
m.Get("/tag/:tag", repo.SingleRelease)
m.Get("/latest", repo.LatestRelease)
}, repo.MustBeNotEmpty, context.RepoRef())
m.Group("/releases", func() {
m.Get("/new", repo.NewRelease)