ugc.go 447 B

123456789101112131415161718192021222324
  1. package http
  2. import (
  3. "go-common/app/interface/main/tv/model"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. //ugcPlayurl is used for getting ugc play url
  7. func ugcPlayurl(c *bm.Context) {
  8. var (
  9. err error
  10. mid int64
  11. )
  12. param := new(model.PlayURLReq)
  13. if err = c.Bind(param); err != nil {
  14. return
  15. }
  16. if param.AccessKey != "" {
  17. if cmid, ok := c.Get("mid"); ok {
  18. mid = cmid.(int64)
  19. }
  20. }
  21. c.JSONMap(gobSvc.UgcPlayurl(c, param, mid))
  22. }