cache.go 419 B

1234567891011121314151617181920
  1. package http
  2. import (
  3. "encoding/json"
  4. "go-common/app/interface/main/app-card/model/card/ai"
  5. "go-common/library/ecode"
  6. bm "go-common/library/net/http/blademaster"
  7. )
  8. func upRcmd(c *bm.Context) {
  9. params := c.Request.Form
  10. item := params.Get("item")
  11. var is []*ai.Item
  12. if err := json.Unmarshal([]byte(item), &is); err != nil {
  13. c.JSON(nil, ecode.RequestErr)
  14. return
  15. }
  16. c.JSON(nil, feedSvc.UpRcmdCache(c, is))
  17. }