Fixed Change Password Bug
This commit is contained in:
parent
f46a843e0b
commit
671e7fca26
1 changed files with 7 additions and 5 deletions
12
login.go
12
login.go
|
@ -61,11 +61,13 @@ 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")
|
templateLogin := getTemplate("login.html")
|
||||||
|
|
||||||
// loginStatus := checkLogin(w, r)
|
loginStatus := checkLogin(w, r)
|
||||||
// if loginStatus != nil {
|
if loginStatus != nil {
|
||||||
// handleHome(w, r)
|
http.Redirect(w, r, "/home", http.StatusSeeOther)
|
||||||
// return loginStatus.Info
|
return nil
|
||||||
// }
|
// handleHome(w, r)
|
||||||
|
// return loginStatus.Info
|
||||||
|
}
|
||||||
|
|
||||||
if r.Method == "GET" {
|
if r.Method == "GET" {
|
||||||
templateLogin.Execute(w, LoginFormData{CanAdmin: false})
|
templateLogin.Execute(w, LoginFormData{CanAdmin: false})
|
||||||
|
|
Loading…
Reference in a new issue