service/app/mix/controller/vericode_api.go

25 lines
550 B
Go
Raw Permalink Normal View History

2023-12-21 22:17:40 +08:00
package controller
import (
"service/api/errcode"
vericodeproto "service/api/proto/vericode/proto"
"service/app/mix/service"
"service/bizcommon/util"
"service/library/logger"
"github.com/gin-gonic/gin"
)
func ApiSendVeriCode(ctx *gin.Context) {
req := ctx.MustGet("client_req").(*vericodeproto.ApiSendReq)
ec := service.DefaultService.ApiSendVeriCode(ctx, req)
if ec != errcode.ErrCodeLoginSrvOk {
logger.Error("ApiSendVeriCode fail, req: %v, ec: %v", util.ToJson(req), ec)
2023-12-30 19:28:50 +08:00
ReplyErrCodeMsg(ctx, ec)
2023-12-21 22:17:40 +08:00
return
}
ReplyOk(ctx, nil)
}