Skip to content

Commit

Permalink
BE: [feat] 갤러리 프리뷰 내용 반환 CSID-DGU#83
Browse files Browse the repository at this point in the history
  • Loading branch information
Seoyoung2222 committed Dec 3, 2024
1 parent 02425db commit 6a297b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
public class GallerySimpleResponseDto {
private Long postId;
private String imageUrl;
private String content;
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public GalleryPreviewResponseDto getGalleryPreview(Long crewId) {
.map(post -> GallerySimpleResponseDto.builder()
.postId(post.getId())
.imageUrl(post.getImages().get(0).getImageUrl())
.content(post.getContent() != null && post.getContent().length() > 30
? post.getContent().substring(0, 20) + "..."
: post.getContent())
.build())
.collect(Collectors.toList());

Expand Down

0 comments on commit 6a297b2

Please sign in to comment.