Skip to content

Commit

Permalink
Merge pull request #112 from jhy11/community
Browse files Browse the repository at this point in the history
[feat]: 커뮤니티 글 조회 시 작성자 프로필 이미지 반환
  • Loading branch information
jhy11 authored Aug 16, 2023
2 parents 8a5fc88 + e222e56 commit 28b7886
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class PostClickResponseDto {
private Long postId;
private String title;
private String author;
private String profileUrl;
private List<String> imgUrls;
private Integer size;
private Integer category;
Expand All @@ -30,11 +31,12 @@ public class PostClickResponseDto {

private boolean scrapFlag;

public PostClickResponseDto(String clickedMember, Long postId, String title, String author, List<String> imgUrls, Integer size, Integer category, Integer gender, Integer deliveryType, Integer deliveryFee, String address, Integer price, String detail, Integer postType, Integer postState, LocalDateTime createdAt, boolean scrapFlag) {
public PostClickResponseDto(String clickedMember, Long postId, String title, String author, String profileUrl, List<String> imgUrls, Integer size, Integer category, Integer gender, Integer deliveryType, Integer deliveryFee, String address, Integer price, String detail, Integer postType, Integer postState, LocalDateTime createdAt, boolean scrapFlag) {
this.clickedMember = clickedMember;
this.postId = postId;
this.title = title;
this.author = author;
this.profileUrl = profileUrl;
this.imgUrls = imgUrls;
this.size = size;
this.category = category;
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/umc/refit/web/service/CommunityService.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public PostClickResponseDto create(PostDto postDto, List<MultipartFile> multipar
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down Expand Up @@ -145,6 +146,7 @@ public PostClickResponseDto clickPost(Long postId, Authentication authentication
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down Expand Up @@ -209,6 +211,7 @@ public PostClickResponseDto changeState(Long postId, Authentication authenticati
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down Expand Up @@ -275,6 +278,7 @@ public PostClickResponseDto update(Long postId, PostDto postDto, List<MultipartF
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down Expand Up @@ -312,6 +316,7 @@ public PostClickResponseDto updateWithoutImage(Long postId, PostDto postDto, Aut
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down

0 comments on commit 28b7886

Please sign in to comment.