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

[FEAT] 데이트 코스 좋아요 등록 API 구현 - #68 #74

Merged
merged 8 commits into from
Jul 11, 2024

Conversation

gardening-y
Copy link
Contributor

🔥Pull requests

⛳️ 작업한 브랜치

👷 작업한 내용

데이트 코스 좋아요 등록 API를 구현했습니다.

    @Transactional
    public void createCourseLike(Long userId, Long courseId) {
        User findUser = getUser(userId);
        Course findCourse = getCourse(courseId);
        validateCourseLike(findUser, findCourse);
        saveCourseLike(findUser, findCourse);
    }

User와 Course를 찾아서 이미 좋아요가 존재하는 경우 예외를 터뜨리고, 그렇지 않은 경우 검증에 통과해서 해당 Course의 Like를 생성해주도록 구현했습니다.

🚨 참고 사항

추가로 몇몇개 리팩토링 해놨어요 ex) 메서드 명

📟 관련 이슈

Copy link
Member

@sjk4618 sjk4618 left a comment

Choose a reason for hiding this comment

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

완벽하시네요 역시

@gardening-y gardening-y merged commit 0ff307c into develop Jul 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 데이트 코스 좋아요 등록 API 구현
2 participants