yjp 1 年間 前
コミット
14847572ac
1 ファイル変更4 行追加4 行削除
  1. 4 4
      convenient/domain/auth/user/api.go

+ 4 - 4
convenient/domain/auth/user/api.go

@@ -198,12 +198,12 @@ func (simple *Simple) Bind(binder *binding.Binder) {
 				}
 
 				if strutils.IsStringNotEmpty(phone) {
-					encryptedPassword, err := encoding.AESEncrypt(phone, simple.AESKey)
+					encryptedPhone, err := encoding.AESEncrypt(phone, simple.AESKey)
 					if err != nil {
 						return false, errors.New(err.Error())
 					}
 
-					conditions.Equal(ColumnPhone, encryptedPassword)
+					conditions.Equal(ColumnPhone, encryptedPhone)
 				}
 
 				return true, nil
@@ -214,12 +214,12 @@ func (simple *Simple) Bind(binder *binding.Binder) {
 				}
 
 				if strutils.IsStringNotEmpty(email) {
-					encryptedPassword, err := encoding.AESEncrypt(email, simple.AESKey)
+					encryptedEmail, err := encoding.AESEncrypt(email, simple.AESKey)
 					if err != nil {
 						return false, errors.New(err.Error())
 					}
 
-					conditions.Equal(ColumnEmail, encryptedPassword)
+					conditions.Equal(ColumnEmail, encryptedEmail)
 				}
 
 				return true, nil