aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-12-20 17:18:26 +0000
committerGitHub <noreply@github.com>2021-12-20 17:18:26 +0000
commit0ac845042e14c85934f02ecef2696e1a8651663e (patch)
tree798d7a1266f2cf683ba47da7e576620c255222e0 /routers/web/web.go
parentce840bb177fe343c5a366f739a65b9c0efe65c34 (diff)
downloadgitea-0ac845042e14c85934f02ecef2696e1a8651663e.tar.gz
gitea-0ac845042e14c85934f02ecef2696e1a8651663e.zip
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>
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index 6ede410e3e..41c4e122fb 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -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)