user_controller.go
601 字节
package mobile_client
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/user/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/user/service"
)
type UserController struct {
baseController
}
func (controller *UserController) SendSmsCode() {
authService := service.UserService{}
smsCodeCmd := &command.SendSmsCodeCommand{}
err := controller.Unmarshal(smsCodeCmd)
if err != nil {
controller.Response(nil, err)
return
}
err = authService.SendSmsCaptcha(smsCodeCmd)
controller.Response(nil, err)
}