sms.go 406 B

12345678910111213141516171819202122
  1. package http
  2. import (
  3. pb "go-common/app/service/main/sms/api"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func send(ctx *bm.Context) {
  7. req := new(pb.SendReq)
  8. if err := ctx.Bind(req); err != nil {
  9. return
  10. }
  11. ctx.JSON(smsSvc.Send(ctx, req))
  12. }
  13. func sendBatch(ctx *bm.Context) {
  14. req := new(pb.SendBatchReq)
  15. if err := ctx.Bind(req); err != nil {
  16. return
  17. }
  18. ctx.JSON(smsSvc.SendBatch(ctx, req))
  19. }