From 575564031a7c24975c91977d365b9957d105ee1f Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 8 Oct 2024 18:58:57 -0400 Subject: [PATCH] dang --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 6d885a9..d3f1365 100644 --- a/main.go +++ b/main.go @@ -47,7 +47,7 @@ func main() { e.Type = "text" e.Validator = "email" e.FailMessage = "Must be a valid email address" - e.Name = "email" + e.Name = "theemail" f.Add(e) e = forms.NewElement() @@ -56,7 +56,7 @@ func main() { e.Validator = "" e.Autocomplete = "new-password" e.FailMessage = "Passsword Incorrect" - e.Name = "oldpassword" + e.Name = "theoldpassword" f.Add(e) e = forms.NewElement() @@ -125,14 +125,14 @@ func main() { defer c.Quit() // Authenticate. - if err := c.Auth(f.GetValue("email"), f.GetValue("oldpassword")); err != nil { - f.MakeInvalid("oldpassword", "Invalid password") + if err := c.Auth(f.GetValue("theemail"), f.GetValue("theoldpassword")); err != nil { + f.MakeInvalid("theoldpassword", "Invalid password") d.Body = f.Render(true) tmpl.Execute(w, d) return } // Change the password - if !modifyPasswordFile(f.GetValue("email"), f.GetValue("newpassword")) { + if !modifyPasswordFile(f.GetValue("theemail"), f.GetValue("newpassword")) { log.Println(err) d.Body = "Internal error" tmpl.Execute(w, d)