Skip to content
Snippets Groups Projects

Fix the user update endpoint not working

2 files
+ 2
3
Compare changes
  • Side-by-side
  • Inline

Files

@@ -150,8 +150,7 @@ public class DatabaseConnection implements AutoCloseable {
userStatement.setBoolean(2, user.isEnabled());
userStatement.setString(3, user.getUsername());
assert this.updateReturnedNoResults(userStatement.execute());
if (userStatement.getUpdateCount() == 0) {
if (userStatement.executeUpdate() == 0) {
throw new SQLException("There is no user with that username");
}
}
Loading