aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index 88a12df19d..b7128fc3a9 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -469,6 +469,11 @@ func RegisterRoutes(m *web.Route) {
})
})
}, packagesEnabled)
+ m.Group("/secrets", func() {
+ m.Get("", user_setting.Secrets)
+ m.Post("", web.Bind(forms.AddSecretForm{}), user_setting.SecretsPost)
+ m.Post("/delete", user_setting.SecretsDelete)
+ })
m.Get("/organization", user_setting.Organization)
m.Get("/repos", user_setting.Repos)
m.Post("/repos/unadopted", user_setting.AdoptOrDeleteRepository)
@@ -982,10 +987,12 @@ func RegisterRoutes(m *web.Route) {
m.Combo("").Get(repo.DeployKeys).
Post(web.Bind(forms.AddKeyForm{}), repo.DeployKeysPost)
m.Post("/delete", repo.DeleteDeployKey)
- m.Group("/secrets", func() {
- m.Post("", web.Bind(forms.AddSecretForm{}), repo.SecretsPost)
- m.Post("/delete", repo.DeleteSecret)
- })
+ })
+
+ m.Group("/secrets", func() {
+ m.Get("", repo.Secrets)
+ m.Post("", web.Bind(forms.AddSecretForm{}), repo.SecretsPost)
+ m.Post("/delete", repo.DeleteSecret)
})
m.Group("/lfs", func() {