-
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
#8-1 떡국 단순 생성 API #14
Conversation
코드 리뷰 요청합니다 🙆 @mungmnb777 |
@AuthenticationPrincipal을 활용하셔도 되고, SecurityContext를 활용하셔도 됩니다. |
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.
고생하셨습니다
build.gradle
Outdated
@@ -24,6 +24,7 @@ repositories { | |||
dependencies { | |||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | |||
implementation 'org.springframework.boot:spring-boot-starter-security' | |||
implementation 'org.springframework.boot:spring-boot-starter-validation' |
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.
validation 의존성을 저도 추가해놔서 빼도 될 것 같네용
|
||
public CreateTteokgukResponse createTteokguk(CreateTteokgukRequest request) { | ||
Member member = memberRepository.findById(request.memberId()) | ||
.orElseThrow(() -> BusinessException.of(MEMBER_NOT_FOUND)); |
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.
요청 바디로 획득한 유저의 정보보다, SecurityContext의 유저 정보를 이용해 생성하는건 어떤가요?
위의 로직은 유저가 다른 유저의 떡국을 생성하는 일이 생길 수 있겠네요
성공적으로 Merge 되었습니다. Shout out to @mungmnb777 😉 |
Issue ticket link and number
Describe changes
Notification for Reviewer