white.go 422 B

123456789101112131415161718192021
  1. package http
  2. import (
  3. "go-common/library/log"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func addWhite(c *bm.Context) {
  7. v := new(struct {
  8. MID int64 `form:"mid" validate:"required"`
  9. Type int `form:"type" validate:"required"`
  10. })
  11. if err := c.Bind(v); err != nil {
  12. return
  13. }
  14. err := svr.InsertWhite(c, v.MID, v.Type)
  15. if err != nil {
  16. log.Error("growup svr.AddWhite error(%v)", err)
  17. }
  18. c.JSON(nil, err)
  19. }