func ensureIsWorker() gin.HandlerFunc {
	return func(c *gin.Context) {
		u, _ := c.Get("role")
		role := u.(string)
		if role != string(Worker) {
			fmt.Println("Redirecting to /dashboard from ensureIsWorker")
			c.Redirect(http.StatusFound, "/dashboard")
		}
	}
}
// Ensures that the user is a Worker
Ensures that the user is a Worker
// Ensures that the user is a Worker
func ensureIsWorker() gin.HandlerFunc {
	return func(c *gin.Context) {
		u, _ := c.Get("role")
		role := u.(string)
		if role != string(Worker) {
			fmt.Println("Redirecting to /dashboard from ensureIsWorker")
			c.Redirect(http.StatusFound, "/dashboard")
		}
	}
}
func ensureIsWorker ( ) gin . HandlerFunc { return func ( c * gin . Context ) { u , _ := c . Get ( " " ) role := u . ( string ) if role != string ( Worker ) { fmt . Println ( " " ) c . Redirect ( http . StatusFound , " " ) } } }
Ensures that the user is a Worker
Ensures that the user is a Worker