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

#8-1 떡국 단순 생성 API #14

Merged
merged 1 commit into from
Jan 22, 2024
Merged

#8-1 떡국 단순 생성 API #14

merged 1 commit into from
Jan 22, 2024

Conversation

h-beeen
Copy link
Contributor

@h-beeen h-beeen commented Jan 21, 2024

Issue ticket link and number

Describe changes

  • SImpleMemberRepository로 인해, MemberRepository가 제네릭을 상속하면서 MemberRepository의 반환형이 꼬이는 오류 수정
  • 재료명 수정
  • 떡국 단순 생성 API (재고 감산 및 검증 제외)

Notification for Reviewer

  • 추후 로그인 API가 개발된 이후, 인증을 어떻게 사용할 수 있을지 궁금해요 (ex: @Authenticationprincipal)
  • 테이블 엔티티와 관련된 부분은 추후 본 PR에 추가커밋으로 올리겠습니다.

@h-beeen h-beeen added the feat feature label Jan 21, 2024
@h-beeen h-beeen self-assigned this Jan 21, 2024
@github-actions github-actions bot requested a review from mungmnb777 January 21, 2024 13:32
Copy link

코드 리뷰 요청합니다 🙆 @mungmnb777

@mungmnb777
Copy link
Contributor

mungmnb777 commented Jan 21, 2024

추후 로그인 API가 개발된 이후, 인증을 어떻게 사용할 수 있을지 궁금해요 (ex: @Authenticationprincipal)

@AuthenticationPrincipal을 활용하셔도 되고, SecurityContext를 활용하셔도 됩니다.

Copy link
Contributor

@mungmnb777 mungmnb777 left a 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'
Copy link
Contributor

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));
Copy link
Contributor

Choose a reason for hiding this comment

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

요청 바디로 획득한 유저의 정보보다, SecurityContext의 유저 정보를 이용해 생성하는건 어떤가요?
위의 로직은 유저가 다른 유저의 떡국을 생성하는 일이 생길 수 있겠네요

@h-beeen h-beeen merged commit 8ab9e1c into develop Jan 22, 2024
2 checks passed
@h-beeen h-beeen deleted the feat/#8-1 branch January 22, 2024 08:41
Copy link

성공적으로 Merge 되었습니다. Shout out to @mungmnb777 😉

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

Successfully merging this pull request may close these issues.

2 participants