Browse Source

Fix wrong middleware sequence (#26428)

tags/v1.21.0-rc0
Lunny Xiao 10 months ago
parent
commit
e7cbb0e7c9
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      routers/web/web.go

+ 1
- 1
routers/web/web.go View File

@@ -1131,7 +1131,7 @@ func registerRoutes(m *web.Route) {
m.Get(".atom", feedEnabled, repo.ReleasesFeedAtom)
}, ctxDataSet("EnableFeed", setting.Other.EnableFeed),
repo.MustBeNotEmpty, reqRepoReleaseReader, context.RepoRefByType(context.RepoRefTag, true))
m.Get("/releases/attachments/{uuid}", repo.GetAttachment, repo.MustBeNotEmpty, reqRepoReleaseReader)
m.Get("/releases/attachments/{uuid}", repo.MustBeNotEmpty, reqRepoReleaseReader, repo.GetAttachment)
m.Group("/releases", func() {
m.Get("/new", repo.NewRelease)
m.Post("/new", web.Bind(forms.NewReleaseForm{}), repo.NewReleasePost)

Loading…
Cancel
Save