From ee9499dff219c48c0bd72951522a09bd144c4d13 Mon Sep 17 00:00:00 2001 From: Won-chan Chae Date: Mon, 27 May 2024 22:43:06 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=8C=93=EA=B8=80=20=EC=98=A4?= =?UTF-8?q?=EB=9E=98=EB=90=9C=20=EC=88=9C=20=EC=A0=95=EB=A0=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../capstone/domain/qna/repository/AnswerRepositoryImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));