pull/241/head
skiffer-git 2 years ago
parent 54566997b2
commit ed52ecb259

@ -37,7 +37,7 @@ func Verify(c *gin.Context) {
if params.Email != "" { if params.Email != "" {
account = params.Email account = params.Email
} else { } else {
account = params.PhoneNumber account = params.AreaCode + params.PhoneNumber
} }
if params.VerificationCode == config.Config.Demo.SuperCode { if params.VerificationCode == config.Config.Demo.SuperCode {
@ -56,9 +56,9 @@ func Verify(c *gin.Context) {
var accountKey string var accountKey string
switch params.UsedFor { switch params.UsedFor {
case constant.VerificationCodeForRegister: case constant.VerificationCodeForRegister:
accountKey = params.AreaCode + account + "_" + constant.VerificationCodeForRegisterSuffix accountKey = account + "_" + constant.VerificationCodeForRegisterSuffix
case constant.VerificationCodeForReset: case constant.VerificationCodeForReset:
accountKey = params.AreaCode + account + "_" + constant.VerificationCodeForResetSuffix accountKey = account + "_" + constant.VerificationCodeForResetSuffix
} }
code, err := db.DB.GetAccountCode(accountKey) code, err := db.DB.GetAccountCode(accountKey)

Loading…
Cancel
Save