-
Notifications
You must be signed in to change notification settings - Fork 0
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
π :: (Meogo-3) user #4
Conversation
Warning Rate limit exceeded@meltapplee has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 10 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 UserFacade
participant UserRepository
participant UserNotFoundException
UserFacade->>UserRepository: getUserByAccountId(accountId)
alt User found
UserRepository-->>UserFacade: return User
else User not found
UserRepository-->>UserFacade: return null
UserFacade->>UserNotFoundException: throw UserNotFoundException
end
Poem
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 using PR comments)
Other keywords and placeholders
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: 1
Outside diff range, codebase verification and nitpick comments (1)
src/main/kotlin/org/meogo/domain/user/domain/User.kt (1)
11-29
:User
μν°ν° ν΄λμ€λ₯Ό κ°μ νμΈμ.
User
μν°ν° ν΄λμ€λ μ ꡬ쑰νλμ΄ μκ³ λͺ¨λ² μ¬λ‘λ₯Ό λ°λ₯΄κ³ μμ΅λλ€. κ·Έλ¬λ λͺ κ°μ§ κ°μ ν μμμ΄ μμ΅λλ€:
password
μμ±μ μΌλ° ν μ€νΈλ‘ μ μ₯νλ©΄ μ λ©λλ€. μ μ₯νκΈ° μ μ ν΄μν΄μΌ ν©λλ€.enrolledSchool
μμ±μ κΈ°λ³Έκ°μ΄ 0μΈ non-nullableλ‘ λ§λ€ μ μμ΅λλ€.profile
μμ±μ κΈ°λ³Έκ°μ΄ λΉ λ¬Έμμ΄μΈ non-nullableλ‘ λ§λ€ μ μμ΅λλ€.λ€μ diffλ₯Ό μ μ©νμ¬ μ μλ κ°μ μ¬νμ ꡬννμΈμ:
- val password: String, + val password: String, // TODO: Hash the password before storing it. - @Column(name = "enrolled_school", nullable = true) - val enrolledSchool: Int? = 0, + @Column(name = "enrolled_school", nullable = false) + val enrolledSchool: Int = 0, - val profile: String? = null, + val profile: String = "",
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- src/main/kotlin/org/meogo/domain/user/domain/User.kt (1 hunks)
- src/main/kotlin/org/meogo/domain/user/domain/UserRole.kt (1 hunks)
- src/main/kotlin/org/meogo/domain/user/exception/UserNotFoundException.kt (1 hunks)
- src/main/kotlin/org/meogo/domain/user/facade/UserFacade.kt (1 hunks)
- src/main/kotlin/org/meogo/domain/user/repository/UserRepository.kt (1 hunks)
- src/main/kotlin/org/meogo/global/error/exception/ErrorCode.kt (1 hunks)
Files skipped from review due to trivial changes (1)
- src/main/kotlin/org/meogo/domain/user/domain/UserRole.kt
Additional comments not posted (6)
src/main/kotlin/org/meogo/domain/user/exception/UserNotFoundException.kt (1)
1-8
: μ½λ λ³κ²½ μ¬νμ΄ μΉμΈλμμ΅λλ€!μ΄ νμΌμ Kotlin κ·μΉκ³Ό λͺ¨λ² μ¬λ‘λ₯Ό μ λ°λ₯΄κ³ μμ΅λλ€:
- ν¨ν€μ§ κ΅¬μ‘°κ° μ μ 리λμ΄ μμ΅λλ€.
- κ΄λ ¨ importκ° ν¬ν¨λμ΄ μμ΅λλ€.
- μμΈ ν΄λμ€ μ΄λ¦μ΄ μ€λͺ μ μ λλ€.
- μ±κΈν€μ μν΄ objectλ₯Ό μ¬μ©νλ κ²μ μ’μ μ νμ λλ€.
MeogoException
μ νμ₯νλ©΄ μΌκ΄λ μ€λ₯ μ²λ¦¬κ° κ°λ₯ν©λλ€.- 미리 μ μλ μ€λ₯ μ½λλ₯Ό μ¬μ©νλ©΄ μ½λ μ¬μ¬μ©μ±κ³Ό μ μ§ κ΄λ¦¬μ±μ΄ ν₯μλ©λλ€.
src/main/kotlin/org/meogo/global/error/exception/ErrorCode.kt (1)
10-11
: μ’μ 보μ λλ€!μλ‘μ΄ μλ¬ μ½λ
USER_NOT_FOUND
λ₯Ό μΆκ°ν κ²μ μ¬μ©μλ₯Ό μ°Ύμ μ μλ μλ리μ€μ λν μλ¬ μ²λ¦¬ μΈλΆμ±μ ν₯μμν΅λλ€. μλ¬ μ½λλ κΈ°μ‘΄ ν¨ν΄μ λ°λ₯΄κ³ μ¬λ°λ₯΄κ² ꡬνλμμ΅λλ€.src/main/kotlin/org/meogo/domain/user/repository/UserRepository.kt (3)
8-8
: μ’μ 보μ λλ€!
save
λ©μλμ μκ·Έλμ²κ° μ¬λ°λ₯΄κ³ Spring Dataμ μ μ₯ λ©μλ λͺ λͺ κ·μΉμ λ°λ₯΄κ³ μμ΅λλ€.
10-10
: μ’μ 보μ λλ€!
findByAccountId
λ©μλμ μκ·Έλμ²κ° μ¬λ°λ₯΄κ³ Spring Dataμ μ‘°ν λ©μλ λͺ λͺ κ·μΉμ λ°λ₯΄κ³ μμ΅λλ€.
12-12
: μ’μ 보μ λλ€!
existsByAccountId
λ©μλμ μκ·Έλμ²κ° μ¬λ°λ₯΄κ³ Spring Dataμ μ‘΄μ¬ μ¬λΆ νμΈ λ©μλ λͺ λͺ κ·μΉμ λ°λ₯΄κ³ μμ΅λλ€.src/main/kotlin/org/meogo/domain/user/facade/UserFacade.kt (1)
19-20
: μ ꡬνλ λ©μλμ λλ€!
UserRepository
μμaccountId
λ‘ μ¬μ©μλ₯Ό μ‘°ννκ³ , μ¬μ©μκ° μλ κ²½μ°UserNotFoundException
μ λμ§λ κ²μ μ’μ λ°©λ²μ λλ€.
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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/main/kotlin/org/meogo/global/jwt/JwtTokenProvider.kt (3 hunks)
Additional context used
detekt
src/main/kotlin/org/meogo/global/jwt/JwtTokenProvider.kt
[warning] 83-83: The caught exception is swallowed. The original exception could be lost.
(detekt.exceptions.SwallowedException)
[warning] 85-85: The caught exception is swallowed. The original exception could be lost.
(detekt.exceptions.SwallowedException)
[warning] 87-87: The caught exception is swallowed. The original exception could be lost.
(detekt.exceptions.SwallowedException)
Additional comments not posted (7)
src/main/kotlin/org/meogo/global/jwt/JwtTokenProvider.kt (7)
31-32
: μ½λ λ³κ²½ μ¬νμ΄ μ’μ 보μ λλ€!νμ μΆλ‘ μ μ¬μ©νμ¬ μ½λλ₯Ό κ°κ²°νκ² λ§λ€μλ€μ. κΈ°λ₯μλ μν₯μ μ£Όμ§ μμΌλ©΄μ κ°λ μ±μ΄ ν₯μλμμ΅λλ€.
36-36
: μ’μ 리ν©ν λ§μ΄μμ!
TokenResponse
κ°μ²΄λ₯Ό μ§μ λ°ννλλ‘ λ³κ²½νμ¬ μ½λκ° λ κ°κ²°ν΄μ‘λ€μ. κΈ°λ₯μλ μν₯μ μ£Όμ§ μμΌλ©΄μ κ°λ μ±μ΄ ν₯μλμμ΅λλ€.
40-41
: μ½λ λ³κ²½ μ¬νμ΄ μ’μ 보μ λλ€!λ©μλ 체μ΄λμ μ¬μ©νμ¬ μ‘μΈμ€ ν ν°μ μμ±νλ μ½λκ° λ κ°κ²°ν΄μ‘λ€μ. κΈ°λ₯μλ μν₯μ μ£Όμ§ μμΌλ©΄μ κ°λ μ±μ΄ ν₯μλμμ΅λλ€.
50-51
: 리ν©ν λ§μ΄ μ λμμ΄μ!λ©μλ 체μ΄λμ μ¬μ©νμ¬ λ¦¬νλ μ ν ν°μ μμ±νλ μ½λκ° λ κ°κ²°ν΄μ‘λ€μ. κΈ°λ₯μλ μν₯μ μ£Όμ§ μμΌλ©΄μ κ°λ μ±μ΄ ν₯μλμμ΅λλ€.
59-60
: μ’μ λ³κ²½ μ¬νμ΄μμ!ν ν°μ νμ±ν κ²°κ³Όλ₯Ό μ§μ λ°ννλλ‘ λ³κ²½νμ¬ μ½λκ° λ κ°κ²°ν΄μ‘λ€μ. κΈ°λ₯μλ μν₯μ μ£Όμ§ μμΌλ©΄μ κ°λ μ±μ΄ ν₯μλμμ΅λλ€.
65-65
: 리ν©ν λ§μ΄ μ λμμ΄μ!"Bearer " μ λμ¬λ₯Ό μ κ±°ν ν ν°μ μ§μ λ°ννλλ‘ λ³κ²½νμ¬ μ½λκ° λ κ°κ²°ν΄μ‘λ€μ. κΈ°λ₯μλ μν₯μ μ£Όμ§ μμΌλ©΄μ κ°λ μ±μ΄ ν₯μλμμ΅λλ€.
72-73
: μ’μ λ³κ²½ μ¬νμ΄μμ!
UsernamePasswordAuthenticationToken
κ°μ²΄λ₯Ό μ§μ λ°ννλλ‘ λ³κ²½νμ¬ μ½λκ° λ κ°κ²°ν΄μ‘λ€μ. κΈ°λ₯μλ μν₯μ μ£Όμ§ μμΌλ©΄μ κ°λ μ±μ΄ ν₯μλμμ΅λλ€.
close #3
Summary by CodeRabbit
μλ‘μ΄ κΈ°λ₯
User
ν΄λμ€ λ°UserRole
μ΄κ±°ν μΆκ°.UserFacade
ν΄λμ€ λμ .UserRepository
μΈν°νμ΄μ€ μΆκ°.UserNotFoundException
μμΈ μΆκ°.USER_NOT_FOUND
μ€λ₯ μ½λ μΆκ°.λ²κ·Έ μμ
λ¬Έμν