hlfw.ca

webbing

Download patch

ref: f34029dedce9172fa3d5a9a86169c3b883202483
parent: df458c8e7978b956aed7cd66f4d32bb6b3fcefc9
author: halfwit <halfwit@iMac.hitronhub.home>
date: Tue Nov 5 11:36:56 PST 2019

Missed a few

--- a/client.go
+++ b/client.go
@@ -34,7 +34,13 @@
 		}
 		log.Fatal("Unable to continue due to template errors")
 	}
-	//errs := router.ValidatePlugins()
+	errs = router.ValidatePlugins()
+	if len(errs) > 0 {
+		for _, err := range errs {
+			log.Print(err)
+		}
+		log.Fatal("Unable to continue due to plugin errors")
+	}
 	go func() {
 		http.ListenAndServe(":6060", nil)
 	}()
--- a/router/run.go
+++ b/router/run.go
@@ -92,7 +92,7 @@
 }
 
 func (d *handle) logout(w http.ResponseWriter, r *http.Request) {
-	d.manager.SessionDestroy(w, r)
+	d.manager.Destroy(w, r)
 	http.Redirect(w, r, "/index.html", 302)
 
 }
@@ -138,7 +138,7 @@
 }
 
 func getUser(d *handle, w http.ResponseWriter, r *http.Request) (string, string, session.Session, db.Access) {
-	us := d.manager.SessionStart(w, r)
+	us := d.manager.Start(w, r)
 	user, ok1 := us.Get("username").(string)
 	status, ok2 := us.Get("login").(string)
 	role, ok3 := us.Get("role").(db.Access)