-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor: 디스코드 연동 로직에 도메인 서비스 적용 #485
refactor: 디스코드 연동 로직에 도메인 서비스 적용 #485
Conversation
Job Summary for GradleCheck Style and Test to Develop :: build-test
|
Warning Rate limit exceeded@Sangwook02 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 57 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Walkthrough디스코드 연동 서비스에서 검증 로직을 개선하기 위해 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OnboardingDiscordService
participant DiscordValidator
participant Database
User->>OnboardingDiscordService: DiscordLinkRequest
OnboardingDiscordService->>DiscordValidator: validateVerifyDiscordCode
DiscordValidator->>Database: Check code and duplicates
Database-->>DiscordValidator: Return validation results
DiscordValidator-->>OnboardingDiscordService: Validation result
OnboardingDiscordService-->>User: Discord account linked successfully
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- src/main/java/com/gdschongik/gdsc/domain/discord/application/OnboardingDiscordService.java (4 hunks)
- src/main/java/com/gdschongik/gdsc/domain/discord/domain/DiscordValidator.java (1 hunks)
- src/test/java/com/gdschongik/gdsc/domain/discord/DiscordValidatorTest.java (1 hunks)
- src/test/java/com/gdschongik/gdsc/global/common/constant/DiscordConstant.java (1 hunks)
Files skipped from review due to trivial changes (1)
- src/test/java/com/gdschongik/gdsc/global/common/constant/DiscordConstant.java
Additional comments not posted (10)
src/main/java/com/gdschongik/gdsc/domain/discord/domain/DiscordValidator.java (1)
11-27
: 검증 로직이 적절합니다.
validateVerifyDiscordCode
메서드는 디스코드 인증 코드와 중복 사용자명 및 별명을 검증합니다. 예외 처리가 적절하게 이루어지고 있습니다.src/test/java/com/gdschongik/gdsc/domain/discord/DiscordValidatorTest.java (3)
20-31
: 테스트 케이스가 적절합니다.
인증코드가_일치하지_않는다면_실패한다
테스트는 인증 코드가 일치하지 않을 때 예외가 발생하는지 확인합니다.
33-44
: 테스트 케이스가 적절합니다.
이미_존재하는_디스코드_유저네임이라면_실패한다
테스트는 중복된 디스코드 사용자명이 있을 때 예외가 발생하는지 확인합니다.
46-57
: 테스트 케이스가 적절합니다.
이미_존재하는_닉네임이라면_실패한다
테스트는 중복된 닉네임이 있을 때 예외가 발생하는지 확인합니다.src/main/java/com/gdschongik/gdsc/domain/discord/application/OnboardingDiscordService.java (6)
7-7
: 새로운 의존성 추가가 적절합니다.
DiscordValidator
가 올바르게 추가되었습니다.
22-22
: 로깅 기능 추가가 적절합니다.
@Slf4j
애노테이션을 사용하여 로깅 기능이 추가되었습니다.
37-37
: 새로운 의존성 주입이 적절합니다.
DiscordValidator
가 생성자 주입 방식으로 올바르게 주입되었습니다.
65-66
: 중복 사용자명 및 별명 검사가 적절합니다.중복된 디스코드 사용자명과 별명을 검사하는 로직이 추가되었습니다.
68-69
: 검증 로직이 적절합니다.
discordValidator.validateVerifyDiscordCode
메서드를 호출하여 검증 로직을 처리합니다.
78-78
: 로깅이 적절합니다.성공적인 디스코드 연동 시 멤버 ID를 로깅합니다.
Job Summary for GradleCheck Style and Test to Develop :: build-test
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/main/java/com/gdschongik/gdsc/domain/discord/domain/DiscordValidator.java (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/main/java/com/gdschongik/gdsc/domain/discord/domain/DiscordValidator.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
public class DiscordValidator { | ||
|
||
public void validateVerifyDiscordCode( | ||
Integer code, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integer code, | |
Integer requestedCode, |
Job Summary for GradleCheck Style and Test to Develop :: build-test
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🌱 관련 이슈
📌 작업 내용 및 특이사항
OnboardingDiscordService
에서DiscordValidator
로 옮겼습니다.📝 참고사항
📚 기타
Summary by CodeRabbit
신규 기능
DiscordValidator
클래스 추가, 중복 사용자 이름 및 별명 검증 기능 포함.버그 수정
문서화
DiscordConstant
클래스 추가.