diff --git a/src/main/java/space/space_spring/dto/comment/request/CreateCommentRequest.java b/src/main/java/space/space_spring/dto/comment/request/CreateCommentRequest.java index 8de21fb9..69fcb3c1 100644 --- a/src/main/java/space/space_spring/dto/comment/request/CreateCommentRequest.java +++ b/src/main/java/space/space_spring/dto/comment/request/CreateCommentRequest.java @@ -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) { diff --git a/src/main/java/space/space_spring/service/LikeService.java b/src/main/java/space/space_spring/service/LikeService.java index a143f464..3687d898 100644 --- a/src/main/java/space/space_spring/service/LikeService.java +++ b/src/main/java/space/space_spring/service/LikeService.java @@ -59,9 +59,9 @@ public void validateAlreadyLikedComment(Long userId, Long commentId) { Optional 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); } }