diff --git a/api/src/main/kotlin/com/few/api/domain/article/usecase/ReadArticlesUseCase.kt b/api/src/main/kotlin/com/few/api/domain/article/usecase/ReadArticlesUseCase.kt index 3cddb5272..c07aff30c 100644 --- a/api/src/main/kotlin/com/few/api/domain/article/usecase/ReadArticlesUseCase.kt +++ b/api/src/main/kotlin/com/few/api/domain/article/usecase/ReadArticlesUseCase.kt @@ -65,14 +65,14 @@ class ReadArticlesUseCase( existInArticleMainCardRecords = (existInArticleMainCardRecords + joinedArticleMainCardRecords).toSet() - // 아티클 컨텐츠 조회 - val selectArticleContentsRecords: List = - articleDao.selectArticleContents(existInArticleMainCardRecords.map { it.articleId }.toSet()) - setContentsToRecords(selectArticleContentsRecords, existInArticleMainCardRecords) - // TODO: 결과를 로컬 캐시에 저장 } + // 아티클 컨텐츠 조회 + val selectArticleContentsRecords: List = + articleDao.selectArticleContents(existInArticleMainCardRecords.map { it.articleId }.toSet()) + setContentsToRecords(selectArticleContentsRecords, existInArticleMainCardRecords) + val sortedArticles = updateAndSortArticleViews(existInArticleMainCardRecords, articleViewsRecords) val articleUseCaseOuts: List = sortedArticles.map { a ->