21 lines
392 B
Go
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)
|
|
}
|