Conversation
ca1af
reviewed
Aug 6, 2024
| @PostMapping("/posts/{postId}/views") | ||
| @Operation(description = "postId 에 해당하는 게시글의 조회수를 추가 한다.") | ||
| public void addViewCount(@PathVariable Long postId){ | ||
| public void addViewCount(@PathVariable Long postId , @AuthenticationPrincipal CustomUserDetails userDetails){ |
Contributor
There was a problem hiding this comment.
조회수 추가하는데에 인증정보는 필요 없을 것으로 보입니다
Comment on lines
+28
to
33
| //POST | ||
| POST_NOT_FOUND(500 , "포스트를 찾을 수 없습니다."), | ||
| NOT_MY_POST(501 , "사용자가 작성한 포스트가 아닙니다."), | ||
| MEMBER_ALREADY_LIKE_POST(502 , "사용자가 이미 좋아요를 누른 포스트입니다."), | ||
| MEMBER_ALREADY_DISLIKE_POST(503 , "사용자가 이미 싫어요를 누른 포스트입니다."); | ||
|
|
Comment on lines
+31
to
+34
| public String getName(CustomUserDetails customUserDetails) { | ||
| Member member = memberRepository.findById(customUserDetails.getId()).orElseThrow(() -> new CustomException(ErrorCode.MEMBER_NOT_FOUND)); | ||
| return member.getNickname(); | ||
| } |
|
|
||
| @Component | ||
| @RequiredArgsConstructor | ||
| public class CommonService { |
ca1af
approved these changes
Aug 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor : 회의 때 진행했던 내용을 바탕으로 , 기존 controller logging 제거
-> error 추적을 위해 error log 는 출력하도록 설정하였습니다.