mirror of
https://github.com/iLoveElysia/openbilibili.git
synced 2026-06-08 05:58:29 -05:00
23 lines
406 B
Go
23 lines
406 B
Go
|
|
package http
|
||
|
|
|
||
|
|
import (
|
||
|
|
pb "go-common/app/service/main/sms/api"
|
||
|
|
bm "go-common/library/net/http/blademaster"
|
||
|
|
)
|
||
|
|
|
||
|
|
func send(ctx *bm.Context) {
|
||
|
|
req := new(pb.SendReq)
|
||
|
|
if err := ctx.Bind(req); err != nil {
|
||
|
|
return
|
||
|
|
}
|
||
|
|
ctx.JSON(smsSvc.Send(ctx, req))
|
||
|
|
}
|
||
|
|
|
||
|
|
func sendBatch(ctx *bm.Context) {
|
||
|
|
req := new(pb.SendBatchReq)
|
||
|
|
if err := ctx.Bind(req); err != nil {
|
||
|
|
return
|
||
|
|
}
|
||
|
|
ctx.JSON(smsSvc.SendBatch(ctx, req))
|
||
|
|
}
|