diff options
author | John Olheiser <john.olheiser@gmail.com> | 2020-02-25 16:54:13 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 16:54:13 -0600 |
commit | e5944a9521102c4917399a6550a0756919527944 (patch) | |
tree | e893caf967a7aacf276d1db265d9a91cd8b2b86f /modules | |
parent | c161bb013e091c0bcc524f07d50c028d9daf8cce (diff) | |
download | gitea-e5944a9521102c4917399a6550a0756919527944.tar.gz gitea-e5944a9521102c4917399a6550a0756919527944.zip |
Change admin dashboard to POST (#10465)
* Add form and convert to POST
* Redirect for flash
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/auth/admin.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/auth/admin.go b/modules/auth/admin.go index 975069a4b7..a772680680 100644 --- a/modules/auth/admin.go +++ b/modules/auth/admin.go @@ -48,3 +48,13 @@ type AdminEditUserForm struct { func (f *AdminEditUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { return validate(errs, ctx.Data, f, ctx.Locale) } + +// AdminDashboardForm form for admin dashboard operations +type AdminDashboardForm struct { + Op int `binding:"required"` +} + +// Validate validates form fields +func (f *AdminDashboardForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) +} |