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: 즐찾 음식으로부터 음식 생성 메소드 구현 (#96) #97

Merged
merged 5 commits into from
Nov 15, 2023

Conversation

synoti21
Copy link
Contributor

  • 즐찾 음식으로부터 음식 생성 메소드 구현
  • 테스트 코드 작성 및 통과 확인
  • 새로운 api endpoint: /food/favorite/createfrom
  • 새로운 dto: CreateFoodFromFavoriteFoodDto

@synoti21 synoti21 added the feat 기능 구현 label Nov 14, 2023
@synoti21 synoti21 requested a review from win-luck November 14, 2023 17:56
@synoti21 synoti21 self-assigned this Nov 14, 2023
@synoti21 synoti21 linked an issue Nov 14, 2023 that may be closed by this pull request
@win-luck win-luck changed the title Feat: 즐찾 음식으로부터 음식 생성 메소드 구현 Feat: 즐찾 음식으로부터 음식 생성 메소드 구현 (#96) Nov 15, 2023
Copy link
Contributor

@win-luck win-luck 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 +322 to 325
public Long createFoodFromFavoriteFood(CreateFoodFromFavoriteFoodDto createFoodFromFavoriteFoodDto) {
validateFavoriteFood(createFoodFromFavoriteFoodDto.getFavoriteFoodId(), createFoodFromFavoriteFoodDto.getUserId());
FavoriteFood favoriteFood = getFavoriteFoodById(createFoodFromFavoriteFoodDto.getFavoriteFoodId());
Food food = FavoriteFood.createFoodFromFavoriteFood(favoriteFood);
Copy link
Contributor

Choose a reason for hiding this comment

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

누락된 로직 반영해주셔서 감사합니다! 다만 새로 태어난 food가 자신이 즐찾음식으로부터 태어났다는 것을 표현하기 위해, food.setFavoriteFood 메서드만 325 라인 아래에 한 줄 추가해주시면 될 것 같습니다!

@synoti21 synoti21 requested a review from win-luck November 15, 2023 04:14
@win-luck win-luck merged commit d227a3c into master Nov 15, 2023
1 check passed
@synoti21 synoti21 deleted the feat/96-feat-favorite-food branch November 20, 2023 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Favorite Food로부터 Food 생성 (#96)
2 participants