Skip to content

Commit

Permalink
refactor: 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
arkchive committed Aug 17, 2024
1 parent 22a44a6 commit c2fc113
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class Request {
private String content;
private boolean isReply;
@Nullable
private long targetId;
private Long targetId;

@Builder
public Comment toEntity(User user, Post post) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/space/space_spring/service/LikeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public void validateAlreadyLikedComment(Long userId, Long commentId) {
Optional<CommentLike> existingLike = commentLikeDao.findByUserAndComment(user, comment);

if(existingLike.isPresent()) {
throw new CustomException(ALREADY_LIKED_THE_POST);
throw new CustomException(ALREADY_LIKED_THE_COMMENT);
} else if(existingLike.isEmpty()) {
throw new CustomException(NOT_LIKED_THE_POST_YET);
throw new CustomException(NOT_LIKED_THE_COMMENT_YET);
}
}

Expand Down

0 comments on commit c2fc113

Please sign in to comment.