Skip to content

Commit

Permalink
Merge pull request #93 from dongkyun0713/dongkyun
Browse files Browse the repository at this point in the history
fix() : ๋‹ต๋ณ€ ์‚ญ์ œ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
  • Loading branch information
dongkyun0713 authored Feb 26, 2024
2 parents 53b71c4 + ca12a6b commit f31cab6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private void validateAuthorIsLoggedInUser(Long id, Long userId) {
.orElseThrow(() -> new CustomException(ErrorCode.USER_NOT_FOUND));
Answer answer = answerRepository.findById(id)
.orElseThrow(() -> new CustomException(ErrorCode.ANSWER_NOT_FOUND));
if (answer.getAuthor().getId().equals(user.getId())) {
if (!answer.getAuthor().getId().equals(user.getId())) {
throw new CustomException(ErrorCode.MISMATCH_AUTHOR);
}
}
Expand Down

0 comments on commit f31cab6

Please sign in to comment.