diff --git a/src/main/java/app/repositories/BanRepository.java b/src/main/java/app/repositories/BanRepository.java index f38da65..1aac7f1 100644 --- a/src/main/java/app/repositories/BanRepository.java +++ b/src/main/java/app/repositories/BanRepository.java @@ -18,7 +18,7 @@ public interface BanRepository extends PagingAndSortingRepository { "(:begin_date is null or DATE_PART('EPOCH', b.timestamp) >= :begin_date) and " + "(:end_date is null or :end_date <= DATE_PART('EPOCH', b.timestamp)) and " + "(:active is null or b.active = :active) and " + - "(:admin_ids is null or b.unbanned_by_id in :admin_ids)") + "(:admin_ids is null or b.unbanned_by_id in :admin_ids) order by b.id desc") Page getBans(Pageable pageable, @Param(value = "ban_ids")List ban_ids, @Param(value = "account_ids") List account_ids, diff --git a/src/main/java/app/repositories/KillfeedRepository.java b/src/main/java/app/repositories/KillfeedRepository.java index a330348..f93af04 100644 --- a/src/main/java/app/repositories/KillfeedRepository.java +++ b/src/main/java/app/repositories/KillfeedRepository.java @@ -24,7 +24,7 @@ public interface KillfeedRepository extends PagingAndSortingRepository= :utime) and " + "(:server_id is null or k.server_id like :server_id) and" + - "(:account_id is null or (k.attacker_id in :accounts_id and k.attacker_id != k.victim_id))") + "(:account_id is null or (k.attacker_id in :accounts_id and k.attacker_id != k.victim_id)) order by k.id desc") Page getKills(Pageable pageable, @Param("accounts_id") List accounts_id, @Param("server_id") String server_id, @@ -43,7 +43,7 @@ public interface KillfeedRepository extends PagingAndSortingRepository= :utime) and " + "(:server_id is null or k.server_id like :server_id) and" + - "(:account_id is null or (k.victim_id in :accounts_id and k.attacker_id != k.victim_id))") + "(:account_id is null or (k.victim_id in :accounts_id and k.attacker_id != k.victim_id)) order by k.id desc") Page getDeads(Pageable pageable, @Param("accounts_id") List accounts_id, @Param("server_id") String server_id, @@ -73,7 +73,7 @@ public interface KillfeedRepository extends PagingAndSortingRepository= :utime) and " + "(:server_id is null or k.server_id like :server_id) and" + - "(:account_id is null or k.assister_id in :accounts_id)") + "(:account_id is null or k.assister_id in :accounts_id) order by k.id desc") Page getAssists(Pageable pageable, @Param("accounts_id") List accounts_id, @Param("server_id") String server_id,