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 구현 #79

Closed
wants to merge 0 commits into from
Closed

feat: 팔로우 요청 API 구현 #79

wants to merge 0 commits into from

Conversation

kdkdhoho
Copy link
Collaborator

@kdkdhoho kdkdhoho commented Feb 7, 2024

Description

  • 팔로우 요청 API를 구현했습니다.
    Path에 followingUserId를 받고, AccessToken을 통해 followerUser를 식별합니다.

Relation Issues

@kdkdhoho kdkdhoho added the 기능 label Feb 7, 2024
@kdkdhoho kdkdhoho self-assigned this Feb 7, 2024
@kdkdhoho kdkdhoho requested a review from pparkjs as a code owner February 7, 2024 02:23
@kdkdhoho kdkdhoho linked an issue Feb 7, 2024 that may be closed by this pull request
Copy link
Collaborator

@pparkjs pparkjs left a comment

Choose a reason for hiding this comment

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

간단한 로직이라 그런지 손볼대 없이 잘 하신 거 같습니다!

Comment on lines 92 to 95

public void follow(Long followingUserId, String accessToken) {
User followingUser = userRepository.getById(followingUserId);

Long followerUserId = jwtManager.read(accessToken);
User followerUser = userRepository.getById(followerUserId);

Follow follow = new Follow(followingUser, followerUser);
followRepository.save(follow);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

팔로우 요청 로직 깔끔하게 잘 작성하셨네요!

@kdkdhoho kdkdhoho closed this Feb 8, 2024
kdkdhoho added a commit that referenced this pull request Feb 8, 2024
@kdkdhoho kdkdhoho deleted the feat/66 branch February 8, 2024 02:41
@kdkdhoho
Copy link
Collaborator Author

해당 PR 머지 안했는데 자동으로 머지가 되어버렸습니다~!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

팔로우 요청 API 구현
2 participants