Save pic to PG

This commit is contained in:
P0nk
2024-09-27 07:39:24 +02:00
parent f33d4fbc1c
commit 2044166967
6 changed files with 79 additions and 31 deletions

View File

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