Save client addresses async on chr select

Almost rid of all db queries in Client
This commit is contained in:
P0nk
2024-10-03 08:28:22 +02:00
parent e38344ceae
commit 2b6ef9feb5
10 changed files with 91 additions and 83 deletions

View File

@@ -169,4 +169,19 @@ public class AccountRepository {
.execute() > 0;
}
}
public void setIpAndMacsAndHwid(int accountId, String ip, String hwid, String macs) {
String sql = """
UPDATE account
SET ip = :ip, macs = :macs, hwid = :hwid
WHERE id = :id""";
try (Handle handle = connection.getHandle()) {
handle.createUpdate(sql)
.bind("id", accountId)
.bind("ip", ip)
.bind("hwid", hwid)
.bind("macs", macs)
.execute();
}
}
}