From a4d2e31e324c9c217a89fd346ff29dfbad96113a Mon Sep 17 00:00:00 2001 From: huGgW Date: Tue, 19 Sep 2023 21:47:05 +0900 Subject: [PATCH] Feat: Change to sort by date, not createdat. --- .../wafflestudio/csereal/core/news/database/NewsRepository.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/news/database/NewsRepository.kt b/src/main/kotlin/com/wafflestudio/csereal/core/news/database/NewsRepository.kt index eec400f0..d86200ab 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/news/database/NewsRepository.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/news/database/NewsRepository.kt @@ -95,7 +95,7 @@ class NewsRepositoryImpl( } val newsEntityList = jpaQuery - .orderBy(newsEntity.createdAt.desc()) + .orderBy(newsEntity.date.desc()) .offset(pageRequest.offset) .limit(pageRequest.pageSize.toLong()) .distinct()