mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 11:22:10 +08:00 
			
		
		
		
	VerificationCodeForRegisterSuffix
This commit is contained in:
		
							parent
							
								
									c76ecd48f1
								
							
						
					
					
						commit
						5dd761282f
					
				@ -15,7 +15,7 @@ type paramsCertification struct {
 | 
				
			|||||||
	PhoneNumber      string `json:"phoneNumber"`
 | 
						PhoneNumber      string `json:"phoneNumber"`
 | 
				
			||||||
	VerificationCode string `json:"verificationCode"`
 | 
						VerificationCode string `json:"verificationCode"`
 | 
				
			||||||
	OperationID      string `json:"operationID" binding:"required"`
 | 
						OperationID      string `json:"operationID" binding:"required"`
 | 
				
			||||||
	UsedFor          int `json:"usedFor"`
 | 
						UsedFor          int    `json:"usedFor"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func Verify(c *gin.Context) {
 | 
					func Verify(c *gin.Context) {
 | 
				
			||||||
@ -47,7 +47,7 @@ func Verify(c *gin.Context) {
 | 
				
			|||||||
	if params.UsedFor == 0 {
 | 
						if params.UsedFor == 0 {
 | 
				
			||||||
		params.UsedFor = 1
 | 
							params.UsedFor = 1
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	accountKey := account + "_" + constant.VerificationCodeForResetSuffix
 | 
						accountKey := account + "_" + constant.VerificationCodeForRegisterSuffix
 | 
				
			||||||
	code, err := db.DB.GetAccountCode(accountKey)
 | 
						code, err := db.DB.GetAccountCode(accountKey)
 | 
				
			||||||
	log.NewInfo(params.OperationID, "redis phone number and verificating Code", account, code)
 | 
						log.NewInfo(params.OperationID, "redis phone number and verificating Code", account, code)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user