service/app/mix/controller/email_api.go

24 lines
590 B
Go

package controller
import (
"service/api/errcode"
emailproto "service/api/proto/email/proto"
"service/app/mix/service"
"service/bizcommon/util"
"service/library/logger"
"github.com/gin-gonic/gin"
)
func ApiSendRavenIQTestResultAsEmail(ctx *gin.Context) {
req := ctx.MustGet("client_req").(*emailproto.ApiCreateReq)
ec := service.DefaultService.ApiSendRavenIQTestResultAsEmail(ctx, req)
if ec != errcode.ErrCodeEmailSrvOk {
logger.Error("ApiSendRavenIQTestResultAsEmail fail, req: %v, ec: %v", util.ToJson(req), ec)
ReplyErrCodeMsg(ctx, ec)
return
}
ReplyOk(ctx, nil)
}