diff --git a/back/src/main/java/com/example/capstone/domain/qna/repository/AnswerRepositoryImpl.java b/back/src/main/java/com/example/capstone/domain/qna/repository/AnswerRepositoryImpl.java index d751c51e33..eea606e017 100644 --- a/back/src/main/java/com/example/capstone/domain/qna/repository/AnswerRepositoryImpl.java +++ b/back/src/main/java/com/example/capstone/domain/qna/repository/AnswerRepositoryImpl.java @@ -74,7 +74,7 @@ private OrderSpecifier[] createOrderSpecifier(String sortBy) { List orderSpecifierList = new ArrayList<>(); if(sortBy.equals("date")) { - orderSpecifierList.add(new OrderSpecifier(Order.DESC, answer.createdDate)); + orderSpecifierList.add(new OrderSpecifier(Order.ASC, answer.createdDate)); } else if(sortBy.equals("like")) { orderSpecifierList.add(new OrderSpecifier(Order.DESC, answer.likeCount));