Refactoring

This commit is contained in:
Chris Mann 2023-07-26 09:11:51 +02:00
parent b969c9994f
commit e6b6e50547
2 changed files with 1 additions and 11 deletions

View file

@ -76,10 +76,7 @@ func handlePasswd(w http.ResponseWriter, r *http.Request) {
login := checkLogin(w, r) login := checkLogin(w, r)
if login == nil { if login == nil {
data.Common.LoggedIn = false
http.Redirect(w, r, "/", http.StatusFound) http.Redirect(w, r, "/", http.StatusFound)
// templatePasswd.Execute(w, data)
return return
} }
data.Login.Status = login data.Login.Status = login

View file

@ -14,14 +14,7 @@ func handleUser(w http.ResponseWriter, r *http.Request) {
login := checkLogin(w, r) login := checkLogin(w, r)
if login == nil { if login == nil {
templatePasswd := getTemplate("passwd.html") http.Redirect(w, r, "/", http.StatusFound)
templatePasswd.Execute(w, PasswdTplData{
Common: NestedCommonTplData{
// CanAdmin: login.Common.CanAdmin,
CanAdmin: false,
LoggedIn: true},
})
return return
} }