cache.go 511 B

1234567891011121314151617181920212223242526
  1. package http
  2. import (
  3. "go-common/library/ecode"
  4. "go-common/library/log"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. func expireUpRating(c *bm.Context) {
  8. arg := new(struct {
  9. MID int64 `form:"mid"`
  10. })
  11. if err := c.Bind(arg); err != nil {
  12. log.Error("error bind arg")
  13. c.JSON(nil, ecode.RequestErr)
  14. return
  15. }
  16. mid := arg.MID
  17. err := svc.ExpireUpRatingCache(c, mid)
  18. if err != nil {
  19. log.Error("svc.ExpireUpRatingCache mid(%v) err(%v)", mid, err)
  20. c.JSON(nil, err)
  21. return
  22. }
  23. c.JSON(true, err)
  24. }