diff options
author | Giteabot <teabot@gitea.io> | 2023-08-10 19:26:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 11:26:22 +0000 |
commit | ec37ea5945244f46026f4ec6a2e5f85b7dfbfcd6 (patch) | |
tree | fd073bdd6bbebb855b8e5aafb0d0e886027d21dc /routers | |
parent | 8ad331c9d209f50ed41c92b289ea2dcf575b1bdb (diff) | |
download | gitea-ec37ea5945244f46026f4ec6a2e5f85b7dfbfcd6.tar.gz gitea-ec37ea5945244f46026f4ec6a2e5f85b7dfbfcd6.zip |
Fix wrong middleware sequence (#26428) (#26436)
Backport #26428 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/web.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/web.go b/routers/web/web.go index 4ef640764b..40ecfc1bd6 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1119,7 +1119,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) |