diff --git a/exercise.wwwapi/Endpoints/UserEndpoints.cs b/exercise.wwwapi/Endpoints/UserEndpoints.cs index 3341469..e38c8aa 100644 --- a/exercise.wwwapi/Endpoints/UserEndpoints.cs +++ b/exercise.wwwapi/Endpoints/UserEndpoints.cs @@ -235,7 +235,7 @@ private static async Task UpdateUser(IRepository repository, Clai // Validate username if (Validator.Password(userPatch.Password) != "Accepted") return TypedResults.BadRequest(new ResponseDTO() { Message = "Invalid password" }); // Hash - string passwordHash = BCrypt.Net.BCrypt.HashPassword(userPatch.Username); + string passwordHash = BCrypt.Net.BCrypt.HashPassword(userPatch.Password); // Update user.PasswordHash = passwordHash; }