Skip to content

Commit

Permalink
[fix] toPost user 값 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jainefer committed Dec 22, 2024
1 parent 0c4fd39 commit b5ce264
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static PostsResponse.ReviewResponse toReview(ItemsReviewJpaEntity review)
public static PostsResponse.ReviewsResponse toReviews(List<PostsResponse.ReviewResponse> reviews){
return PostsResponse.ReviewsResponse.builder().reviews(reviews).build();
}
public static PostsResponse.ViewPostResponse toViewPost(ItemsJpaEntity item, ItemsBorrowJpaEntity borrowItem, String status,UserJpaEntity user){
public static PostsResponse.ViewPostResponse toViewPost(ItemsJpaEntity item, ItemsBorrowJpaEntity borrowItem, String status){
return PostsResponse.ViewPostResponse.builder()
.postId(item.getId())
.title(item.getTitle())
Expand All @@ -110,8 +110,8 @@ public static PostsResponse.ViewPostResponse toViewPost(ItemsJpaEntity item, Ite
.itemStatus(status)
.categoryId(item.getCategory().getId())
.categoryName(item.getCategory().getName())
.userId(user.getUserId())
.userName(user.getNickname())
.userId(item.getOwner().getUserId())
.userName(item.getOwner().getNickname())
.build();
}
public static PostsResponse.NoRentalPeriodResponse toOwnerNoRentalPeriod(ItemsBorrowStatusJpaEntity borrowStatus){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public PostsResponse.ViewPostResponse ViewPostService(String postId, String user
break;

}
return PostsConverter.toViewPost(item, borrowItem, status, user);
return PostsConverter.toViewPost(item, borrowItem, status);

}

Expand Down

0 comments on commit b5ce264

Please sign in to comment.