blacklist.go 389 B

12345678910111213141516171819202122
  1. package http
  2. import (
  3. "go-common/library/conf/env"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. var (
  7. _EmptyBlacklistValue = make(map[int64]struct{})
  8. )
  9. func blacklist(c *bm.Context) {
  10. black := spcSvc.BlacklistValue
  11. if env.DeployEnv == env.DeployEnvProd {
  12. if len(black) == 0 {
  13. black = _EmptyBlacklistValue
  14. }
  15. } else {
  16. black = _EmptyBlacklistValue
  17. }
  18. c.JSON(black, nil)
  19. }