This commit is contained in:
leejinseok
2020-02-17 09:57:18 +09:00
parent b7b1252f6d
commit 5b72ccb241

View File

@@ -40,11 +40,7 @@ public class ArticleService {
.map(article -> new ArticleResponseDto(article, user))
.collect(Collectors.toList());
int total = articleRepository.findTotal();
Page<ArticleResponseDto> page = new PageImpl<>(contents, pageable, total);
return page;
return new PageImpl<>(contents, pageable, articleRepository.findTotal());
}
public ArticleResponseDto findById(Long id, User user) {