Skip to content

Commit

Permalink
Merge pull request #10 from SWM-WeLike2Coding/fix/notice
Browse files Browse the repository at this point in the history
fix: 게시글 목록 조회시 dto에 생성 날짜도 포함하도록 수정
  • Loading branch information
kjungw1025 authored Oct 7, 2024
2 parents 4ebc3f1 + 4b76a2b commit e052364
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;

import java.time.LocalDateTime;
import java.util.List;

@Getter
Expand All @@ -21,6 +22,9 @@ public class SummarizedGenericPostDto {
@Schema(description = "작성자", example = "익명")
private final String author;

@Schema(description = "생성 시각")
private final LocalDateTime createdAt;

@Schema(description = "본문", example = "게시글 본문")
private final String body;

Expand All @@ -34,6 +38,7 @@ public SummarizedGenericPostDto(AWSObjectStorageService s3service, int bodySize,
this.id = post.getId();
this.title = post.getTitle();
this.author = nickname;
this.createdAt = post.getCreatedAt();
this.body = slice(post.getBody(), bodySize);
this.images = PostImageDto.listOf(s3service, post.getImages());
this.files = PostFileDto.listOf(s3service, post.getFiles());
Expand Down

0 comments on commit e052364

Please sign in to comment.