func ensureLoggedIn() gin.HandlerFunc {
	return func(c *gin.Context) {
		u, e := c.Get("username")
		if e {
			username := u.(string)
			if username == "" {
				fmt.Println("Redirecting to /log-in from ensureLoggedIn")
				c.Redirect(http.StatusFound, "/about")
			}
		}
	}
}
// Ensures that the user is logged in
Ensures that the user is logged in
// Ensures that the user is logged in
func ensureLoggedIn() gin.HandlerFunc {
	return func(c *gin.Context) {
		u, e := c.Get("username")
		if e {
			username := u.(string)
			if username == "" {
				fmt.Println("Redirecting to /log-in from ensureLoggedIn")
				c.Redirect(http.StatusFound, "/about")
			}
		}
	}
}
func ensureLoggedIn ( ) gin . HandlerFunc { return func ( c * gin . Context ) { u , e := c . Get ( " " ) if e { username := u . ( string ) if username == " " { fmt . Println ( " " ) c . Redirect ( http . StatusFound , " " ) } } } }
Ensures that the user is logged in
Ensures that the user is logged in