func hLogout(w http.ResponseWriter, req *http.Request) { session := data.GetSession(req) log.Printf("%s [%s]", req.URL, session.Id) if session != nil { session.User = nil } http.Redirect(w, req, "/", http.StatusSeeOther) }
func hRegister(w http.ResponseWriter, req *http.Request) { session := data.GetSession(req) log.Printf("%s [%s]", req.URL, session.Id) if req.URL.Path != "/register" { NotFound(w, req) return } NotFound(w, req) }