Handle ban solely through BanService

This commit is contained in:
P0nk
2024-09-29 20:22:27 +02:00
parent c0ee1f8ffe
commit e35060da2a
9 changed files with 78 additions and 113 deletions

View File

@@ -45,7 +45,7 @@ public class AccountRepository {
}
}
public Optional<Account> findIdByChrNameIgnoreCase(String name) {
public Optional<Integer> findIdByChrNameIgnoreCase(String name) {
String sql = """
SELECT id
FROM account AS a
@@ -54,7 +54,7 @@ public class AccountRepository {
try (Handle handle = connection.getHandle()) {
return handle.createQuery(sql)
.bind("name", name)
.mapTo(Account.class)
.mapTo(Integer.class)
.findOne();
}
}