Files
2021-09-29 16:43:40 +08:00

21 lines
392 B
Go

package api
import (
"SciencesServer/app/basic/controller"
"github.com/gin-gonic/gin"
)
type Sms struct{}
func (a *Sms) sCaptcha(c *gin.Context) {
form := &struct {
Mobile string `json:"mobile" form:"mobile" binding:"required"`
}{}
if err := Bind(form)(c); err != nil {
APIFailure(err.(error))(c)
return
}
err := controller.NewSms()().Captcha(form.Mobile)
APIResponse(err)
}