pulled out sqlite3 for json

This commit is contained in:
sm
2013-02-26 22:30:23 -08:00
parent 2bb6ac5e2f
commit 2fee9546f8
5 changed files with 43 additions and 42 deletions
+6 -6
View File
@@ -15,12 +15,12 @@ func homeHandler(w http.ResponseWriter, req *http.Request) {
func loginHandler(w http.ResponseWriter, req *http.Request) {
pwAttempt := req.FormValue("passwd")
if check_password(pwAttempt) {
session, _ := store.Get(req, "creds")
session.Values["logged in"] = true
session.Save(req, w)
if check_password(*passes_file, pwAttempt) {
session, _ := store.Get(req, "creds")
session.Values["logged in"] = true
session.Save(req, w)
http.Redirect(w, req, "/", http.StatusSeeOther)
return
}
return
}
T("login.html").Execute(w, map[string]interface{}{})
}