Refactoring
This commit is contained in:
parent
b969c9994f
commit
e6b6e50547
2 changed files with 1 additions and 11 deletions
|
@ -76,10 +76,7 @@ func handlePasswd(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
login := checkLogin(w, r)
|
||||
if login == nil {
|
||||
data.Common.LoggedIn = false
|
||||
http.Redirect(w, r, "/", http.StatusFound)
|
||||
|
||||
// templatePasswd.Execute(w, data)
|
||||
return
|
||||
}
|
||||
data.Login.Status = login
|
||||
|
|
|
@ -14,14 +14,7 @@ func handleUser(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
login := checkLogin(w, r)
|
||||
if login == nil {
|
||||
templatePasswd := getTemplate("passwd.html")
|
||||
templatePasswd.Execute(w, PasswdTplData{
|
||||
|
||||
Common: NestedCommonTplData{
|
||||
// CanAdmin: login.Common.CanAdmin,
|
||||
CanAdmin: false,
|
||||
LoggedIn: true},
|
||||
})
|
||||
http.Redirect(w, r, "/", http.StatusFound)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue