cookie.go 341 B

12345678910111213141516171819
  1. package http
  2. import (
  3. "go-common/library/ecode"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func cookieInfo(c *bm.Context) {
  7. session := c.Request.Form.Get("session")
  8. if session == "" {
  9. c.JSON(nil, ecode.RequestErr)
  10. return
  11. }
  12. res, err := svr.CookieInfo(c, session)
  13. if err == nil {
  14. c.Set("mid", res.Mid)
  15. }
  16. c.JSON(res, err)
  17. }