|
|
|
@ -17,6 +17,7 @@ import (
|
|
|
|
|
|
|
|
|
|
type ParamsSetPassword struct {
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
PhoneNumber string `json:"phoneNumber"`
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
VerificationCode string `json:"verificationCode"`
|
|
|
|
@ -38,6 +39,9 @@ func SetPassword(c *gin.Context) {
|
|
|
|
|
} else {
|
|
|
|
|
account = params.PhoneNumber
|
|
|
|
|
}
|
|
|
|
|
if params.Name == "" {
|
|
|
|
|
params.Name = account
|
|
|
|
|
}
|
|
|
|
|
if params.VerificationCode != config.Config.Demo.SuperCode {
|
|
|
|
|
accountKey := account + "_" + constant.VerificationCodeForRegisterSuffix
|
|
|
|
|
v, err := db.DB.GetAccountCode(accountKey)
|
|
|
|
@ -54,7 +58,7 @@ func SetPassword(c *gin.Context) {
|
|
|
|
|
openIMRegisterReq.OperationID = params.OperationID
|
|
|
|
|
openIMRegisterReq.Platform = params.Platform
|
|
|
|
|
openIMRegisterReq.UserID = account
|
|
|
|
|
openIMRegisterReq.Nickname = account
|
|
|
|
|
openIMRegisterReq.Nickname = params.Name
|
|
|
|
|
openIMRegisterReq.Secret = config.Config.Secret
|
|
|
|
|
openIMRegisterResp := api.UserRegisterResp{}
|
|
|
|
|
bMsg, err := http2.Post(url, openIMRegisterReq, 2)
|
|
|
|
|