func (VS *Server) distributor(c *gin.Context) {
	r, e := c.Get("role")
	if e {
		// If the User is logged-in
		role := r.(string)
		if role != "" {
			fmt.Println("Redirecting to /dashboard from distributor")
			c.Redirect(http.StatusFound, "/dashboard")
		}
		return
	}
	fmt.Println("Redirecting to /log-in from distributor")
	c.Redirect(http.StatusFound, "/about")
}
// Redirects the User to the dashboard if is logged in or to the log-in screen if is not
Redirects the User to the dashboard if is logged in or to the log-in screen if is not
// Redirects the User to the dashboard if is logged in or to the log - in screen if is not
func (VS *Server) distributor(c *gin.Context) {
	r, e := c.Get("role")
	if e {
		role := r.(string)
		if role != "" {
			fmt.Println("Redirecting to /dashboard from distributor")
			c.Redirect(http.StatusFound, "/dashboard")
		}
		return
	}
	fmt.Println("Redirecting to /log-in from distributor")
	c.Redirect(http.StatusFound, "/about")
}
func ( VS * Server ) distributor ( c * gin . Context ) { r , e := c . Get ( " " ) if e { role := r . ( string ) if role != " " { fmt . Println ( " " ) c . Redirect ( http . StatusFound , " " ) } return } fmt . Println ( " " ) c . Redirect ( http . StatusFound , " " ) }
Redirects the User to the dashboard if is logged in or to the log-in screen if is not
Redirects the User to the dashboard if is logged in or to the log - in screen if is not
// If the User is logged-in