Skip to content

Commit

Permalink
Merge pull request #49 from DEPthes/develop
Browse files Browse the repository at this point in the history
.
  • Loading branch information
jisujeong0 authored Aug 18, 2024
2 parents e0d4f12 + 707861b commit 5841b95
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ public class BoardDetailRes {
private boolean likedTheme; // 주제 좋아요 여부
private String nickname; // 작성자 닉네임
private String imageUrl; // 작성자 프사
private Long themeId; // 주제ID
private String themeContent; // 주제 내용
private String boardTitle; // 게시글 제목
private String boardContent; // 게시글 내용

@Builder
public BoardDetailRes(Long userId, boolean owner, boolean likedBoard, boolean likedTheme, String nickname,
String imageUrl, String themeContent, String boardTitle, String boardContent){
String imageUrl, Long themeId, String themeContent, String boardTitle, String boardContent){
this.userId = userId;
this.owner = owner;
this.likedBoard = likedBoard;
this.likedTheme = likedTheme;
this.nickname = nickname;
this.imageUrl = imageUrl;
this.themeId = themeId;
this.themeContent = themeContent;
this.boardTitle = boardTitle;
this.boardContent = boardContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ public ResponseEntity<?> getBoardDetail(Long boardId, CustomUserDetails customUs
.likedTheme(likedTheme)
.nickname(board.getUser().getNickname())
.imageUrl(board.getUser().getImageUrl())
.themeId(theme.getId())
.themeContent(board.getTheme().getContent())
.boardTitle(board.getTitle())
.boardContent(board.getContent())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ public class ThemeDetailRes {
private PageInfo pageInfo; // 페이지 정보
private Long userId; // 사용자ID
private boolean likedTheme; // 주제 좋아요 여부
private Long themeId; // 주제ID
private String content; // 주제 내용
private String date; // 발행일
private int likeCount; // 주제 좋아요 수
private List<BoardRes> boards; // 게시글 목록

@Builder
public ThemeDetailRes(PageInfo pageInfo, Long userId, boolean likedTheme, String content, LocalDate date, int likeCount, List<BoardRes> boards){
public ThemeDetailRes(PageInfo pageInfo, Long userId, boolean likedTheme, Long themeId,
String content, LocalDate date, int likeCount, List<BoardRes> boards){
this.pageInfo = pageInfo;
this.userId = userId;
this.likedTheme = likedTheme;
this.themeId = themeId;
this.content = content;
this.date = date.format(DateTimeFormatter.ofPattern("yyyy.MM.dd"));
this.likeCount = likeCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public ResponseEntity<?> getThemeDetail(Long themeId, String sortBy, Pageable pa
.pageInfo(pageInfo)
.userId(userId)
.likedTheme(likedTheme)
.themeId(theme.getId())
.content(theme.getContent())
.date(theme.getDate())
.likeCount(themeRepository.countLikesByThemeId(themeId))
Expand Down

0 comments on commit 5841b95

Please sign in to comment.