1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Move POST /{username}/action/{action} to simply POST /{username} (#18045)

The current code unfortunately requires that `action` be a reserved
repository name as it prevents posts to change the settings for
action repositories. However, we can simply change action handler
to work on POST /{username} instead.

Fix #18037

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath
2021-12-20 17:18:26 +00:00
committed by GitHub
parent ce840bb177
commit 0ac845042e
3 changed files with 5 additions and 7 deletions

View File

@@ -484,9 +484,7 @@ func RegisterRoutes(m *web.Route) {
m.Get("/attachments/{uuid}", repo.GetAttachment)
}, ignSignIn)
m.Group("/{username}", func() {
m.Post("/action/{action}", user.Action)
}, reqSignIn)
m.Post("/{username}", reqSignIn, user.Action)
if !setting.IsProd {
m.Get("/template/*", dev.TemplatePreview)