Fixed Change Password Bug

This commit is contained in:
Chris Mann 2023-07-25 14:20:41 +02:00
parent 671e7fca26
commit febfed7bee

View file

@ -59,7 +59,6 @@ type LoginFormData struct {
} }
func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo { func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo {
templateLogin := getTemplate("login.html")
loginStatus := checkLogin(w, r) loginStatus := checkLogin(w, r)
if loginStatus != nil { if loginStatus != nil {
@ -69,6 +68,8 @@ func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo {
// return loginStatus.Info // return loginStatus.Info
} }
templateLogin := getTemplate("login.html")
if r.Method == "GET" { if r.Method == "GET" {
templateLogin.Execute(w, LoginFormData{CanAdmin: false}) templateLogin.Execute(w, LoginFormData{CanAdmin: false})
return nil return nil