mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-22 04:39:19 +08:00
fix bug
This commit is contained in:
parent
ed52ecb259
commit
5c4982a3f1
@ -705,7 +705,7 @@ demo:
|
||||
enable: true
|
||||
superCode: 666666 #超级验证码,建议修改掉,收不到短信验证码时可以用此替代
|
||||
# second
|
||||
codeTTL: 300
|
||||
codeTTL: 60
|
||||
mail: #仅支持qq邮箱,具体操作参考 https://service.mail.qq.com/cgi-bin/help?subtype=1&id=28&no=1001256 必须修改
|
||||
title: "openIM"
|
||||
senderMail: "765567899@qq.com"
|
||||
|
@ -75,13 +75,19 @@ func SendVerificationCode(c *gin.Context) {
|
||||
accountKey = accountKey + "_" + constant.VerificationCodeForRegisterSuffix
|
||||
ok, err := db.DB.JudgeAccountEXISTS(accountKey)
|
||||
if ok || err != nil {
|
||||
log.NewError(params.OperationID, "Repeat send code", params)
|
||||
log.NewError(params.OperationID, "Repeat send code", params, accountKey)
|
||||
c.JSON(http.StatusOK, gin.H{"errCode": constant.RepeatSendCode, "errMsg": "Repeat send code"})
|
||||
return
|
||||
}
|
||||
|
||||
case constant.VerificationCodeForReset:
|
||||
accountKey = accountKey + "_" + constant.VerificationCodeForResetSuffix
|
||||
ok, err := db.DB.JudgeAccountEXISTS(accountKey)
|
||||
if ok || err != nil {
|
||||
log.NewError(params.OperationID, "Repeat send code", params, accountKey)
|
||||
c.JSON(http.StatusOK, gin.H{"errCode": constant.RepeatSendCode, "errMsg": "Repeat send code"})
|
||||
return
|
||||
}
|
||||
}
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
code := 100000 + rand.Intn(900000)
|
||||
|
Loading…
x
Reference in New Issue
Block a user