Skip to content

Commit

Permalink
Merge pull request #56 from DEPthes/develop
Browse files Browse the repository at this point in the history
[DEPLOY]
  • Loading branch information
jisujeong0 authored Aug 19, 2024
2 parents 42c3e12 + 35475b4 commit fa44a36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ public class BoardDetailRes {
private String themeContent; // 주제 내용
private String boardTitle; // 게시글 제목
private String boardContent; // 게시글 내용
private boolean published;

@Builder
public BoardDetailRes(Long userId, boolean owner, boolean likedBoard, boolean likedTheme, String nickname,
String imageUrl, Long themeId, String themeContent, String boardTitle, String boardContent){
String imageUrl, Long themeId, String themeContent, String boardTitle, String boardContent, boolean published){
this.userId = userId;
this.owner = owner;
this.likedBoard = likedBoard;
Expand All @@ -32,5 +33,6 @@ public BoardDetailRes(Long userId, boolean owner, boolean likedBoard, boolean li
this.themeContent = themeContent;
this.boardTitle = boardTitle;
this.boardContent = boardContent;
this.published = published;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private void handleExistingLike(BoardLike boardLike, User user, Board board) {
user.addPoint(score);
board.getUser().addPoint(score);
// 포인트 내역 삭제
LocalDate date = boardLike.getCreatedDate().toLocalDate();
LocalDate date = boardLike.getModifiedDate().toLocalDate();
deletePointHistory(user, date, Math.abs(score));
deletePointHistory(board.getUser(), date, Math.abs(score));

Expand Down Expand Up @@ -305,6 +305,7 @@ public ResponseEntity<?> getBoardDetail(Long boardId, CustomUserDetails customUs
.themeContent(board.getTheme().getContent())
.boardTitle(board.getTitle())
.boardContent(board.getContent())
.published(board.isPublished())
.build();

ApiResponse apiResponse = ApiResponse.builder()
Expand Down

0 comments on commit fa44a36

Please sign in to comment.