Skip to content

Commit

Permalink
Merge pull request #48 from Patrick-Star-CN/main
Browse files Browse the repository at this point in the history
最终更新
  • Loading branch information
Patrick-Star-CN authored Jul 17, 2023
2 parents ddf9882 + 27b8e86 commit 45a6ad6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/userController/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func BindLibraryPassword(c *gin.Context) {
utils.JsonSuccessResponse(c, nil)
}

// SendVerificationCode 这一函数实际上不再被使用
func SendVerificationCode(c *gin.Context) {
var postForm phoneForm
err := c.ShouldBindJSON(&postForm)
Expand Down Expand Up @@ -118,7 +119,7 @@ func GetCaptcha(c *gin.Context) {
}
u := uuid.New()
deviceId := u.String()
redis.RedisClient.Set(context.Background(), user.Username + "_device_id", deviceId, time.Minute * 5)
redis.RedisClient.Set(context.Background(), user.Username+"_device_id", deviceId, time.Minute*5)
data, err := yxyServices.GetSecurityToken(deviceId)
if err != nil {
_ = c.AbortWithError(200, apiException.ServerError)
Expand Down Expand Up @@ -189,6 +190,7 @@ func LoginYxy(c *gin.Context) {
return
}
userServices.SetDeviceID(user, deviceId)
userServices.DecryptUserKeyInfo(user)
userServices.SetYxyUid(user, *uid)
userServices.DecryptUserKeyInfo(user)
userServices.SetPhoneNum(user, postForm.PhoneNum)
Expand Down

0 comments on commit 45a6ad6

Please sign in to comment.