We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
메세지 좋아요에 엄청난 연타를 해보았을 때 다음과같은 이슈가 발생하였습니다.
중복된 데이터가 쌓였습니다!
public MessageLikeResponseDto likeMessage(Long memberId, Long rollingpaperId, Long messageId) { // 메세지 좋아요 대상 "메세지"를 찾는다. final Message message = messageRepository.findById(messageId) .orElseThrow(() -> new NotFoundMessageException(messageId)); // "메세지 좋아요" 테이블에 존재하면 에러를 던진다. if (messageLikeRepository.existsByMemberIdAndMessageId(memberId, messageId)) { throw new InvalidLikeMessageException(messageId, messageId); } // 메세지 좋아요 추가 message.like(); messageLikeRepository.save(new MessageLike(memberId, rollingpaperId, messageId)); return new MessageLikeResponseDto(message.getLikes(), true); }
The text was updated successfully, but these errors were encountered:
asebn1
No branches or pull requests
기능 상세
메세지 좋아요에 엄청난 연타를 해보았을 때 다음과같은 이슈가 발생하였습니다.
중복된 데이터가 쌓였습니다!
기존 코드
The text was updated successfully, but these errors were encountered: