Update RegisterHandler.java

This commit is contained in:
omg-xtao 2022-05-04 16:18:37 +08:00 committed by GitHub
parent 061f70c376
commit b40105e428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,8 +32,7 @@ public class RegisterHandler implements HttpContextHandler {
String password = Authentication.generateHash(registerAccount.password); String password = Authentication.generateHash(registerAccount.password);
Account account = Authentication.getAccountByUsernameAndPassword(registerAccount.username, ""); Account account = Authentication.getAccountByUsernameAndPassword(registerAccount.username, "");
if (account != null) { if (account != null) {
String newPassword = Authentication.generateHash(password); account.setPassword(password);
account.setPassword(newPassword);
account.save(); account.save();
authResponse.success = true; authResponse.success = true;
authResponse.message = ""; authResponse.message = "";