|
|
@@ -236,22 +236,22 @@ func (simple *Simple) Bind(binder *binding.Binder) {
|
|
|
infos := output.Infos
|
|
|
|
|
|
for index, info := range infos {
|
|
|
- if strutils.IsStringNotEmpty(info.Name) {
|
|
|
- encryptedName, err := encoding.AESEncrypt(info.Name, simple.AESKey)
|
|
|
+ if strutils.IsStringNotEmpty(info.Phone) {
|
|
|
+ decryptedPhone, err := encoding.AESDecrypt(info.Phone, simple.AESKey)
|
|
|
if err != nil {
|
|
|
return errResponse, errors.New(err.Error())
|
|
|
}
|
|
|
|
|
|
- info.Name = encryptedName
|
|
|
+ info.Phone = decryptedPhone
|
|
|
}
|
|
|
|
|
|
if strutils.IsStringNotEmpty(info.Email) {
|
|
|
- encryptedEmail, err := encoding.AESEncrypt(info.Email, simple.AESKey)
|
|
|
+ decryptedEmail, err := encoding.AESDecrypt(info.Email, simple.AESKey)
|
|
|
if err != nil {
|
|
|
return errResponse, errors.New(err.Error())
|
|
|
}
|
|
|
|
|
|
- info.Email = encryptedEmail
|
|
|
+ info.Email = decryptedEmail
|
|
|
}
|
|
|
|
|
|
retInfos[index] = info
|