-
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
[FIX]액션 플랜 완료 API로직 수정 #50
Conversation
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.
고생하셨습니다 ~~~
List<String> contents = actionPlanCreateRequestDto.getContents(); | ||
|
||
for(String content : contents) { | ||
ActionPlan actionPlan = ActionPlan.builder() | ||
.content(content) | ||
.seed(seed) | ||
.build(); | ||
actionPlanRepository.save(actionPlan); | ||
} |
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.
�stream 문법으로 간단하게 나타냈던 것과 통일 시켜서 아래처럼 바꿔도 좋을 것 같아요 ~
List<String> contents = actionPlanCreateRequestDto.getContents(); | |
for(String content : contents) { | |
ActionPlan actionPlan = ActionPlan.builder() | |
.content(content) | |
.seed(seed) | |
.build(); | |
actionPlanRepository.save(actionPlan); | |
} | |
List<String> contents = actionPlanCreateRequestDto.getContents(); | |
contents.stream() | |
.map(content -> ActionPlan.builder().content(content).seed(seed).build()) | |
.forEach(actionPlanRepository::save); | |
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.
와아앙 완전 좋아요!!감쟈합니다👍👍
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.
최고입니다 !!!
📣 Related Issue
📝 Summary
🙏 Question & PR point
📬 Reference