diff --git a/src/main/java/org/ntlab/citrusserver/repositories/PublicBookManager.java b/src/main/java/org/ntlab/citrusserver/repositories/PublicBookManager.java index f8cc181..3bc8d98 100644 --- a/src/main/java/org/ntlab/citrusserver/repositories/PublicBookManager.java +++ b/src/main/java/org/ntlab/citrusserver/repositories/PublicBookManager.java @@ -111,6 +111,9 @@ books.sort(Comparator.comparing(Book::getTime).reversed()); return books; case 1: + books.sort(Comparator.comparing(Book::getTime)); + return books; + case 2: ArrayList booksForSort = new ArrayList<>(); for(Book book : books){ HashSet favorites = favoriteManager.getFavorited(book.getAccountId(), book.getBookId()); @@ -127,7 +130,7 @@ } return res; } - return new ArrayList<>(); + return books; } }