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

[ADD] 데일리 루틴 추가 예외처리 추가 #100

Merged
merged 3 commits into from
Jan 14, 2024

Conversation

thguss
Copy link
Member

@thguss thguss commented Jan 13, 2024

✨ Related Issue

📝 기능 구현 명세

image image

🐥 추가적인 언급 사항

  • 데일리 루틴 최대 3개 추가 가능, 중복된 루틴 추가 불가능 관련하여 예외 추가했습니다.

  • 메소드명은 지피티에게 자문을 구했습니다.. 더 직관적인 메소드명이 떠오른다면 추천해주십쇼!
    image
    image

  • 이 외에 더 좋은 코드 리팩토링이 떠오른다면 피드백 리뷰 언제나 환영입니다 :)

@thguss thguss added add 작업 추가 sohyeon 소현 작업 labels Jan 13, 2024
@thguss thguss self-assigned this Jan 13, 2024
Copy link
Contributor

@csb9427 csb9427 left a comment

Choose a reason for hiding this comment

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

메소드명 충분히 직관적이고 좋다고 생각합니다~~!!

Copy link
Contributor

@Chan531 Chan531 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~!

return completedMemberDailyRoutineRepository.findByMemberAndRoutine(member, routine)
.map(completedRoutine -> recreateOldRoutines(member, routine, completedRoutine))
.orElseGet(() -> createNewRoutine(member, routine));
}

private void checkDuplicatedMemberRoutine(Member member, DailyRoutine routine) {
val isExistRoutine = memberDailyRoutineRepository.existsByMemberAndRoutine(member, routine);
Copy link
Contributor

Choose a reason for hiding this comment

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

여기 메서드 분리해서 if문안에 집어넣으면 더 깔끔할 거 같은데 어떻게 생각하시나요?

@thguss thguss merged commit d00f898 into develop Jan 14, 2024
1 check passed
@thguss thguss deleted the feature/#95-routine-add-api branch January 14, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add 작업 추가 sohyeon 소현 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] 데일리 루틴 추가 개수 제한 체크
3 participants