Save pin to PG

This commit is contained in:
P0nk
2024-09-27 06:50:07 +02:00
parent 0f2ef341ce
commit f33d4fbc1c
5 changed files with 63 additions and 22 deletions

View File

@@ -446,14 +446,6 @@ public class Client extends ChannelInboundHandlerAdapter {
public void setPin(String pin) {
this.pin = pin;
try (Connection con = DatabaseConnection.getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE accounts SET pin = ? WHERE id = ?")) {
ps.setString(1, pin);
ps.setInt(2, accId);
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
}
public String getPin() {