fixed leaking info, plus go fmt
This commit is contained in:
parent
fe0411e8df
commit
6a62e10c26
@ -9,10 +9,11 @@ func homeHandler(w http.ResponseWriter, req *http.Request) {
|
|||||||
loggedIn := session.Values["logged in"]
|
loggedIn := session.Values["logged in"]
|
||||||
if loggedIn == nil {
|
if loggedIn == nil {
|
||||||
http.Redirect(w, req, "/login", http.StatusSeeOther)
|
http.Redirect(w, req, "/login", http.StatusSeeOther)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
children := loadChildren(*db_file)
|
children := loadChildren(*db_file)
|
||||||
T("index.html").Execute(w, map[string]interface{}{
|
T("index.html").Execute(w, map[string]interface{}{
|
||||||
"children": children,})
|
"children": children})
|
||||||
}
|
}
|
||||||
|
|
||||||
func loginHandler(w http.ResponseWriter, req *http.Request) {
|
func loginHandler(w http.ResponseWriter, req *http.Request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user