-
Notifications
You must be signed in to change notification settings - Fork 1
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: 아카이브 불러오기 #56
The head ref may contain hidden characters: "BAR-113-BE-\uC544\uCE74\uC774\uBE0C-\uBD88\uB7EC\uC624\uAE30"
feat: 아카이브 불러오기 #56
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.
복잡한 로직인데 잘 짜주셨네요
고생하셨습니다!👍👍
몇가지 코멘트 남겨두었습니다.
conflict도 해결해주세요!
) { | ||
|
||
public static ArchiveUnitResult of(Archive archive) { | ||
if (archive.getTemplate() == null) { |
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.
archive에 메서드로 표현해도 좋아보여요
if (archive.getTemplate() == null) { | |
if (archive.isMemo()) { |
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.
오! 감사합니다 적용해놓을게요
this.content = content; | ||
this.template = template; | ||
public Archive(Member member, MemoFolder memoFolder, MemoContent content, Template template) { | ||
this(null, member, memoFolder, content, template); |
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.
👍
return switch (query.tab()) { | ||
case ALL -> archiveRepository.findAllArchives(query.memberId(), query.folderId()) | ||
.stream().map(ArchiveUnitResult::of).collect(Collectors.toList()); | ||
case MEMO -> archiveRepository.findAllArchivedMemos(query.memberId(), query.folderId()) | ||
.stream().map(ArchiveUnitResult::of).collect(Collectors.toList()); | ||
case TEMPLATE -> archiveRepository.findAllArchivedTemplates(query.memberId(), query.folderId()) | ||
.stream().map(ArchiveUnitResult::of).collect(Collectors.toList()); | ||
}; |
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.
동적쿼리보다 이게 더 좋아보이네요👍👍
|
||
@GetMapping | ||
public ResponseEntity<List<ArchiveUnitResult>> getArchive(AuthMember member, | ||
@RequestBody GetArchiveRequest request) { |
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.
GET 요청에는 queryParam으로 담는게 나을 것 같아요
@ModelAttribute로 선언해도 괜찮겠네요
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.
tabName(전체, 끄적이는, 참고하는) 말씀하신게 맞을까요?? 그렇다면 pathvariable은 어떨까요?
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.
네네 GetArchiveRequest
에 folderId
랑 tabName
이 있는데 body말고 다른 걸로 표현되면 됩니다!
/archives/folder/{folderId}?tabName={}
이런식은 어떤가요?
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.
리뷰 반영 하신 거 확인했습니다!
테스트도 꼼꼼하고 좋네요. 최신순 정렬 반영까지👍👍
머지 하시죠! 수고하셨습니다~!
관련된 이슈
BAR-113
작업 사항