Fixed Change Password Bug

This commit is contained in:
Chris Mann 2023-07-25 14:31:00 +02:00
parent 401bd0dac1
commit 73f0b98adc

View file

@ -15,13 +15,12 @@ type HomePageData struct {
} }
func handleHome(w http.ResponseWriter, r *http.Request) { func handleHome(w http.ResponseWriter, r *http.Request) {
templateHome := getTemplate("home.html")
login := checkLogin(w, r) login := checkLogin(w, r)
if login == nil { if login == nil {
return return
} } else {
templateHome := getTemplate("home.html")
data := &HomePageData{ data := &HomePageData{
Login: login, Login: login,
BaseDN: config.BaseDN, BaseDN: config.BaseDN,
@ -29,6 +28,6 @@ func handleHome(w http.ResponseWriter, r *http.Request) {
CanAdmin: login.CanAdmin, CanAdmin: login.CanAdmin,
LoggedIn: true, LoggedIn: true,
} }
templateHome.Execute(w, data) templateHome.Execute(w, data)
}
} }