package route

import (
	"amuz.es/go/mnemonics/middleware/session"
	"github.com/gin-gonic/gin"
)

func Authenticate(c *gin.Context) {
	content := gin.H{"Hello": "World"}

	sess := session.Default(c)
	var count int
	v := sess.Get("count")
	if v == nil {
		count = 0
	} else {
		count = v.(int)
		count += 1
	}

	//	util.Log().Errorf(" sess : %d", count)

	// conn := util.NewAccoauntSource()
	// conn.Connect()
	// defer conn.Close()
	//
	// conn.Bind("test", "testpw")
	// conn.Search()

	c.JSON(200, content)
}
