summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd/web.go b/cmd/web.go
index ec8ccd5191..13d7660c76 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -258,10 +258,8 @@ func runWeb(ctx *cli.Context) {
m.Group("/users", func() {
m.Get("", admin.Users)
- m.Get("/new", admin.NewUser)
- m.Post("/new", bindIgnErr(auth.AdminCrateUserForm{}), admin.NewUserPost)
- m.Get("/:userid", admin.EditUser)
- m.Post("/:userid", bindIgnErr(auth.AdminEditUserForm{}), admin.EditUserPost)
+ m.Combo("/new").Get(admin.NewUser).Post(bindIgnErr(auth.AdminCrateUserForm{}), admin.NewUserPost)
+ m.Combo("/:userid").Get(admin.EditUser).Post(bindIgnErr(auth.AdminEditUserForm{}), admin.EditUserPost)
m.Post("/:userid/delete", admin.DeleteUser)
})
@@ -276,8 +274,7 @@ func runWeb(ctx *cli.Context) {
m.Group("/auths", func() {
m.Get("", admin.Authentications)
- m.Get("/new", admin.NewAuthSource)
- m.Post("/new", bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost)
+ m.Combo("/new").Get(admin.NewAuthSource).Post(bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost)
m.Combo("/:authid").Get(admin.EditAuthSource).
Post(bindIgnErr(auth.AuthenticationForm{}), admin.EditAuthSourcePost)
m.Post("/:authid/delete", admin.DeleteAuthSource)