Refactoring

This commit is contained in:
Chris Mann 2023-07-25 21:52:19 +02:00
parent 213df69893
commit 2f9b2afa15

View file

@ -178,7 +178,7 @@ func handlePasswd(w http.ResponseWriter, r *http.Request) {
data := &PasswdTplData{ data := &PasswdTplData{
Common: NestedCommonTplData{ Common: NestedCommonTplData{
CanAdmin: false, CanAdmin: false,
LoggedIn: false, LoggedIn: true,
ErrorMessage: "", ErrorMessage: "",
Success: false, Success: false,
}, },
@ -190,6 +190,7 @@ func handlePasswd(w http.ResponseWriter, r *http.Request) {
return return
} }
data.Login.Status = login data.Login.Status = login
data.Common.CanAdmin = login.Common.CanAdmin
if r.Method == "POST" { if r.Method == "POST" {
r.ParseForm() r.ParseForm()