Fixed Change Password Bug

This commit is contained in:
Chris Mann 2023-07-25 15:22:19 +02:00
parent fa22a9eb37
commit 7a5c9be1ad
2 changed files with 2 additions and 1 deletions

View file

@ -28,7 +28,7 @@ func handleHome(w http.ResponseWriter, r *http.Request) {
can_admin := false can_admin := false
if login != nil { if login != nil {
http.Redirect(w, r, "/", http.StatusTemporaryRedirect) can_admin = login.CanAdmin
} }
data := HomePageData{ data := HomePageData{

View file

@ -95,6 +95,7 @@ func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo {
} }
templateLogin.Execute(w, data) templateLogin.Execute(w, data)
} }
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
return loginInfo return loginInfo
} else if r.Method == "GET" { } else if r.Method == "GET" {