Skip to content

Yg 176 refactor post#49

Open
Kwonnamhyung wants to merge 7 commits intodevelopfrom
YG-176-refactor-post
Open

Yg 176 refactor post#49
Kwonnamhyung wants to merge 7 commits intodevelopfrom
YG-176-refactor-post

Conversation

@Kwonnamhyung
Copy link
Contributor

@Kwonnamhyung Kwonnamhyung commented Aug 6, 2024

Refactor : 회의 때 진행했던 내용을 바탕으로 , 기존 controller logging 제거
-> error 추적을 위해 error log 는 출력하도록 설정하였습니다.

  • Post Exception 정리

@ca1af ca1af requested a review from Yejun4911 August 6, 2024 12:35
@PostMapping("/posts/{postId}/views")
@Operation(description = "postId 에 해당하는 게시글의 조회수를 추가 한다.")
public void addViewCount(@PathVariable Long postId){
public void addViewCount(@PathVariable Long postId , @AuthenticationPrincipal CustomUserDetails userDetails){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

조회수 추가하는데에 인증정보는 필요 없을 것으로 보입니다

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 , "사용자가 이미 싫어요를 누른 포스트입니다.");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

죠습니다

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();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거는 어디에쓰는걸까요??


@Component
@RequiredArgsConstructor
public class CommonService {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 컴포넌트는 어디에서 쓰이고있을까요?

Copy link
Contributor

@Yejun4911 Yejun4911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants