Skip to content

Commit 8002e4d

Browse files
authored
Merge pull request #275 from CodIN-INU/refactor/post-feat
fix: post 단건/목록 JSON을 현재 프론트 요구사항에 맞게 정규화
2 parents 5f05f6c + d6893f0 commit 8002e4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/inu/codin/codin/domain/post/dto/response/PostPageItemResponseDTO.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
package inu.codin.codin.domain.post.dto.response;
22

3+
import com.fasterxml.jackson.annotation.JsonInclude;
4+
import com.fasterxml.jackson.annotation.JsonUnwrapped;
35
import lombok.Builder;
46
import lombok.Getter;
57

68
@Getter
9+
@JsonInclude(JsonInclude.Include.NON_NULL)
710
public class PostPageItemResponseDTO {
11+
@JsonUnwrapped // 추후 프론트에 얘기해서 {post:{}, poll:{} 구조로 변경} 현재:{,,,poll:{}}
812
private final PostDetailResponseDTO post;
913
private final PollInfoResponseDTO poll;
1014

0 commit comments

Comments
 (0)