Skip to content

Commit

Permalink
Merge pull request #89 from efub-ecyce/feat/user
Browse files Browse the repository at this point in the history
feat : 작가의 리뷰 리스트 조회
  • Loading branch information
oohyj authored Dec 1, 2024
2 parents 430f72c + 93f8e86 commit c8408b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,6 @@ public ResponseEntity<String> deleteProductImg(User user, Long productId, Long i

return ResponseEntity.status(HttpStatus.OK).body("삭제되었습니다.");
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class UserController {
private final UserService userService;
private final ProductService productService;
private final S3Uploader s3Uploader;
private final ReviewService reviewService;

/* 회원별 북마크 상품 목록 조회 */
@GetMapping("/users/bookmarks")
Expand Down Expand Up @@ -102,6 +103,12 @@ public ResponseEntity<UserInfo> modifyUserAddress(@AuthUser User user , @Request
}


/* 작가의 리뷰 리스트 반환 */
@GetMapping("/artist/{userId}/review")
public ResponseEntity<List<ReviewResponseDto>> getArtistReview(@AuthUser User user){
List<ReviewResponseDto> reviewList = reviewService.getReviewListByArtist(user);
return ResponseEntity.status(HttpStatus.OK).body(reviewList);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public record UserInfo(
String name,
String nickname,
String email ,
String bio,
String phoneNumber,
String profileImageUrl,
String postalCode ,
Expand All @@ -25,6 +26,7 @@ public static UserInfo from(User user , Address address) {
user.getName(),
user.getNickname(),
user.getEmail(),
user.getBio(),
user.getPhoneNumber(),
user.getProfileImage(),
address.getPostalCode(),
Expand All @@ -41,6 +43,7 @@ public static UserInfo of(User user) {
user.getName(),
user.getNickname(),
user.getEmail(),
user.getBio(),
user.getPhoneNumber(),
user.getProfileImage(),
user.getAddress() != null ? user.getAddress().getPostalCode() : null,
Expand Down

0 comments on commit c8408b7

Please sign in to comment.