Skip to content

Commit

Permalink
#164 Refactor : 마이페이지 response 수정 #164
Browse files Browse the repository at this point in the history
  • Loading branch information
ls-rain committed Feb 22, 2024
1 parent 6a89a4f commit 584bb0b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public static CommentResponseDTO.commentSelectRes toCommentSelectRes(Comment_cho
}
public static CommentResponseDTO.myCommentRes toMyCommentResDTO(Comment comment){
return CommentResponseDTO.myCommentRes.builder()
.postId(comment.getPost().getId())
.nickName(comment.getUser().getNickname())
.createdAt(comment.getCreatedAt())
.content(comment.getContent())
Expand Down
1 change: 1 addition & 0 deletions src/main/java/friend/spring/converter/MyPageConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public static MyPageResponseDTO.SavedPostCategoryDetailRes toSavedPostCategoryDe
long diffTime = post.getCreatedAt().until(LocalDateTime.now(), ChronoUnit.DAYS); // now보다 이후면 +, 전이면 -

return MyPageResponseDTO.SavedPostCategoryDetailRes.builder()
.postId(post.getId())
.ago(diffTime)
.title(post.getTitle())
.content(post.getContent())
Expand Down
1 change: 1 addition & 0 deletions src/main/java/friend/spring/converter/PostConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,7 @@ public static ParentPostDTO.ParentPostGetListDTO parentPostGetListDTO(Page<Post>

public static PostResponseDTO.MyPostDTO toMyPostResDTO(Post post){
return PostResponseDTO.MyPostDTO.builder()
.postId(post.getId())
.nickName(post.getUser().getNickname())
.createdAt(post.getCreatedAt())
.title(post.getTitle())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public static class commentSelectRes {
@NoArgsConstructor
@AllArgsConstructor
public static class myCommentRes {
Long postId;
String nickName;
LocalDateTime createdAt;
String content;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/friend/spring/web/dto/MyPageResponseDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public static class MyInquiryRes{
@NoArgsConstructor
@AllArgsConstructor
public static class SavedPostCategoryDetailRes{
Long postId;
Long ago;
String title;
String content;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/friend/spring/web/dto/PostResponseDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public static class ReviewPostGetResponse{
@NoArgsConstructor
@AllArgsConstructor
public static class MyPostDTO {
Long postId;
String nickName;
LocalDateTime createdAt;
String title;
Expand Down

0 comments on commit 584bb0b

Please sign in to comment.