compose file update

This commit is contained in:
Gordon 2022-06-30 19:19:00 +08:00
parent 7823306045
commit 1d105dd345

View File

@ -64,16 +64,16 @@ func SendVerificationCode(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"errCode": constant.HasRegistered, "errMsg": "The phone number has been registered"}) c.JSON(http.StatusOK, gin.H{"errCode": constant.HasRegistered, "errMsg": "The phone number has been registered"})
return return
} }
accountKey = accountKey + "_" + constant.VerificationCodeForRegisterSuffix
ok, err := db.DB.JudgeAccountEXISTS(accountKey) ok, err := db.DB.JudgeAccountEXISTS(accountKey)
if ok || err != nil { if ok || err != nil {
log.NewError(params.OperationID, "The phone number has been registered", params) log.NewError(params.OperationID, "Repeat send code", params)
c.JSON(http.StatusOK, gin.H{"errCode": constant.RepeatSendCode, "errMsg": "The phone number has been registered"}) c.JSON(http.StatusOK, gin.H{"errCode": constant.RepeatSendCode, "errMsg": "Repeat send code"})
return return
} }
accountKey += "_" + constant.VerificationCodeForRegisterSuffix
case constant.VerificationCodeForReset: case constant.VerificationCodeForReset:
accountKey += "_" + constant.VerificationCodeForResetSuffix accountKey = accountKey + "_" + constant.VerificationCodeForResetSuffix
} }
rand.Seed(time.Now().UnixNano()) rand.Seed(time.Now().UnixNano())
code := 100000 + rand.Intn(900000) code := 100000 + rand.Intn(900000)
@ -84,7 +84,7 @@ func SendVerificationCode(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"errCode": constant.SmsSendCodeErr, "errMsg": "Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"}) c.JSON(http.StatusOK, gin.H{"errCode": constant.SmsSendCodeErr, "errMsg": "Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
return return
} }
log.NewDebug("", config.Config.Demo) log.NewDebug(params.OperationID, config.Config.Demo)
if params.Email != "" { if params.Email != "" {
m := gomail.NewMessage() m := gomail.NewMessage()
m.SetHeader(`From`, config.Config.Demo.Mail.SenderMail) m.SetHeader(`From`, config.Config.Demo.Mail.SenderMail)