mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge branch 'superGroup' of github.com:OpenIMSDK/Open-IM-Server into superGroup
This commit is contained in:
commit
53b0d13342
@ -694,7 +694,7 @@ demo:
|
||||
accessKeySecret: 4n9OJ7ZCVN1U6KeHDAtOyNeVZcjOuV
|
||||
signName: 托云信息技术
|
||||
verificationCodeTemplateCode: SMS_226810164
|
||||
enable: true
|
||||
enable: false
|
||||
tencentsms: #腾讯云短信配置,在腾讯云申请成功后,修改以下选项,enable为true则必须修改
|
||||
appID: 2400000648
|
||||
region: "ap-singapore"
|
||||
|
@ -118,7 +118,7 @@ func SendVerificationCode(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
log.Debug(params.OperationID, "send sms success", code, accountKey)
|
||||
data := make(map[string]interface{})
|
||||
data["account"] = account
|
||||
c.JSON(http.StatusOK, gin.H{"errCode": constant.NoError, "errMsg": "Verification code has been set!", "data": data})
|
||||
|
@ -2,7 +2,9 @@ package register
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/utils"
|
||||
"encoding/json"
|
||||
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
|
||||
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
|
||||
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
|
||||
@ -31,6 +33,8 @@ func (t TencentSMS) SendSms(code int, phoneNumber string) (resp interface{}, err
|
||||
if _, ok := err.(*errors.TencentCloudSDKError); ok {
|
||||
return response, err
|
||||
}
|
||||
b, _ := json.Marshal(response.Response)
|
||||
log.Debug("tencent send message is ", code, phoneNumber, string(b))
|
||||
return response, nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user