From fa241efa6d5e934f599e43714e970fa48c9a0f47 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 15 Oct 2014 11:19:20 -0400 Subject: Use binding middleware --- modules/auth/admin.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/auth/admin.go') diff --git a/modules/auth/admin.go b/modules/auth/admin.go index 1f1260d65a..60ea3a3cc2 100644 --- a/modules/auth/admin.go +++ b/modules/auth/admin.go @@ -6,9 +6,8 @@ package auth import ( "github.com/Unknwon/macaron" - "github.com/macaron-contrib/i18n" - "github.com/gogits/gogs/modules/middleware/binding" + "github.com/macaron-contrib/binding" ) type AdminEditUserForm struct { @@ -22,6 +21,6 @@ type AdminEditUserForm struct { LoginType int `form:"login_type"` } -func (f *AdminEditUserForm) Validate(ctx *macaron.Context, errs *binding.Errors, l i18n.Locale) { - validate(errs, ctx.Data, f, l) +func (f *AdminEditUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) } -- cgit v1.2.3