mirror of
				https://github.com/tobychui/zoraxy.git
				synced 2025-10-31 14:04:13 +01:00 
			
		
		
		
	Merge pull request #187 from Kirari04/main
fix missing / unnecessary error check
This commit is contained in:
		| @@ -272,17 +272,14 @@ func HandleNewPasswordSetup(w http.ResponseWriter, r *http.Request) { | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	//Delete the user account | ||||
| 	authAgent.UnregisterUser(username) | ||||
|  | ||||
| 	//Ok. Set the new password | ||||
| 	err = authAgent.CreateUserAccount(username, newPassword, "") | ||||
| 	if err != nil { | ||||
| 	// Un register the user account | ||||
| 	if err := authAgent.UnregisterUser(username); err != nil { | ||||
| 		utils.SendErrorResponse(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	if err != nil { | ||||
| 	//Ok. Set the new password | ||||
| 	if err := authAgent.CreateUserAccount(username, newPassword, ""); err != nil { | ||||
| 		utils.SendErrorResponse(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Toby Chui
					Toby Chui