Skip to content
New issue

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

좋아요 기능 구현 #63

Closed
hikarigin99 opened this issue Jan 22, 2023 · 0 comments · Fixed by #87
Closed

좋아요 기능 구현 #63

hikarigin99 opened this issue Jan 22, 2023 · 0 comments · Fixed by #87
Assignees
Labels
✨ feat 기능 추가
Milestone

Comments

@hikarigin99
Copy link
Collaborator

🚀 목적

사용자는 특정 게시물의 좋아요 를 표시할 수 있다.

🔗 작업

  • 좋아요 생성 기능
    • 사용자는 게시글에 좋아요를 작성할 수 있다.
  • 좋아요 삭제 기능
    • 사용자는 게시글에 자신의 좋아요를 삭제할 수 있다.

✅ 완료조건

@hikarigin99 hikarigin99 added the ✨ feat 기능 추가 label Jan 22, 2023
@hikarigin99 hikarigin99 added this to the Sprint - 2 milestone Jan 22, 2023
@hikarigin99 hikarigin99 self-assigned this Jan 22, 2023
hikarigin99 added a commit that referenced this issue Jan 27, 2023
* add: 좋아요 도메인

- likes 테이블 생성
- userId와 postId FK

* add: 좋아요 생성 및 취소 기능

* add: 게시물 좋아요 개수 증가/감소 기능

- JPQL UPDATE 사용을 위해 @Modifying

* add: Like 관련 에러 메시지 및 테스트용 entity 생성

* add: 좋아요 생성 및 취소 API, LikeRequestDto

* add: testUtils 수정으로 인한 Post 데이터 값 변경

* add: 좋아요 리포지토리와 서비스 테스트

- repository : 추가한 findByUserAndPost 메서드만 진행
- service : BDDMockito 테스트

* add: 좋아요 컨트롤러 테스트 및 Rest docs 생성

* add: build를 위한 test Lombok 제거

* add: 좋아요 생성 API 수정 및 LikeDto userId 변경

- 컨트롤러 API에 postId 추가
- @AuthenticationPrincipal 처리
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feat 기능 추가
Projects
None yet
1 participant