-
Notifications
You must be signed in to change notification settings - Fork 2
[ fix ] : #427 블로그의 게시글 리스트 최신순, 추천순에 첨부이미지 썸네일로 연결되게 백엔드 수정 #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "fix/#389-\uC784\uC2DC\uB85C"
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,4 +20,9 @@ public class PostResponseDto { | |
| private String imageUrl; | ||
| private double score; | ||
|
|
||
| private String content; // 추가 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PostResponseDto에 content, username, categoryId, category 필드를 추가했습니다. username과 category는 |
||
| private String username; // 추가 (user.getNickname() 또는 user.getName()) | ||
| private Long categoryId; // 추가 | ||
| private String category; // 추가 (category.getName()) | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -501,6 +501,7 @@ public Page<PostResponseDto> getPagedPostsByBlog(Long blogId, int page, int size | |
| .viewCount(post.getView()) | ||
| .createdAt(post.getCreatedAt()) | ||
| .modifiedAt(post.getModifiedAt()) | ||
| .imageUrl(post.getImageList().isEmpty() ? null : post.getImageList().get(0).getImageUrl()) // 추가! | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imageUrl 설정 부분에 |
||
| .build()); | ||
| } | ||
|
|
||
|
|
@@ -550,6 +551,7 @@ public Page<PostResponseDto> getPopularPostsByBlog(Long blogId, int page, int si | |
| .viewCount(post.getView()) | ||
| .createdAt(post.getCreatedAt()) | ||
| .modifiedAt(post.getModifiedAt()) | ||
| .imageUrl(post.getImageList().isEmpty() ? null : post.getImageList().get(0).getImageUrl()) // 추가 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 504번 라인과 동일한 문제입니다. Optional을 활용하여 |
||
| .build()); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redis 의존성을 주석 처리했습니다. Redis를 사용하지 않는다면 문제없지만, 추후 Redis를 사용할 계획이 있다면 주석을 해제해야 합니다. 사용 여부를 명확히 결정하고 주석을 남겨주세요. 사용하지 않는다면, 왜 사용하지 않는지에 대한 이유를 추가로 코멘트로 남겨주는 것이 좋습니다.