account.go 376 B

1234567891011121314151617181920
  1. package http
  2. import bm "go-common/library/net/http/blademaster"
  3. func relation(c *bm.Context) {
  4. v := new(struct {
  5. Mid int64 `form:"mid" validate:"min=1"`
  6. })
  7. if err := c.Bind(v); err != nil {
  8. return
  9. }
  10. data, err := spcSvc.Relation(c, v.Mid)
  11. if err != nil {
  12. c.JSON(nil, err)
  13. return
  14. }
  15. c.JSON(struct {
  16. Follower int64 `json:"follower"`
  17. }{Follower: data}, nil)
  18. }