-
Couldn't load subscription status.
- Fork 1
[FEAT] 플레이그라운드 카테고리별 게시물 조회 api에 url 추가 - #504 #505
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
41ce1e9
[#504] feat(RecentPostsResponse): URL 필드 추가 및 동적 주입 방식으로 변경
hyerinhwang-sailin c7fed2f
[#504] feat(PlaygroundAuthService): URL 필드 주입, 메소드 분리, 예외처리
hyerinhwang-sailin 259d567
[#504] feat(PlaygroundAuthServiceTest): 홈화면 게시물 관련 테스트코드 작성
hyerinhwang-sailin 45c5782
[#504] chore(PlaygroundAuthService): 누락된 final 추가
hyerinhwang-sailin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,18 +19,33 @@ public class RecentPostsResponse implements PostWithMemberInfo { | |
| private String category; | ||
| private String content; | ||
| private Boolean isHotPost; | ||
| private String url; | ||
|
|
||
|
|
||
| public static RecentPostsResponse of(PlaygroundPostResponse playgroundPostResponse) { | ||
| public static RecentPostsResponse of(PlaygroundPostResponse playgroundPostResponse, String url) { | ||
| return RecentPostsResponse.builder() | ||
| .id(playgroundPostResponse.postId()) | ||
| .title(playgroundPostResponse.title()) | ||
| .category("HOT") | ||
| .url(url) | ||
| .content(playgroundPostResponse.content()) | ||
| .isHotPost(true) | ||
| .build(); | ||
| } | ||
|
|
||
| public RecentPostsResponse withUrl(String url) { | ||
|
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. 요렇게 조합해서 쓰는 방식 좋네요 👍🏻 |
||
| return RecentPostsResponse.builder() | ||
| .id(this.id) | ||
| .title(this.title) | ||
| .profileImage(this.profileImage) | ||
| .name(this.name) | ||
| .category(this.category) | ||
| .content(this.content) | ||
| .isHotPost(this.isHotPost) | ||
| .url(url) | ||
| .build(); | ||
| } | ||
|
|
||
| public RecentPostsResponse withMemberDetail(String name, String profileImage) { | ||
| return RecentPostsResponse.builder() | ||
| .id(this.id) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
기존 메서드가 뚱뚱하다고 생각했는데 메서드 분리해주신 것 좋습니다! :)