-
Notifications
You must be signed in to change notification settings - Fork 1
[FEAT] 답변에 대한 댓글 기능 업데이트 #369
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
Conversation
| AnswerComment( | ||
| id: $0.answerCommentId, | ||
| writeId: $0.writerId, | ||
| // TODO: 5/20 문의 필요(writer generation, isLiked, isMine, isReport이 있는지 여부) |
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.
체크 좋슴니다!
| ) | ||
| } | ||
|
|
||
| guard let question = response.content.first else { return (nil, nil, true) } |
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.
요렇게 되면 가장 최근의 질문(오늘의 메인 질문)만 가져올 수 있을 것 같습니다! 이는 게시판에서 사용하는데 무리가 없을 것 같으나 답변 리스트 안에서 특정 답변의 인기 답변을 호출할 때 또한 사용할 수 있게 변경하면 어떨까 합니다!
즉, var fetchPopularAnswer: (_ questionId: Int) 요런 식으로 현재 가져와야 할 질문의 ID를 인자로 받아서 처리해주면 좋을 듯 합니다!
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.
++ 오늘의 메인 질문은 전용 API가 있기 때문에 고렇게 받아오는 걸루 만들어도 될 것 같구요!
| try await AnswerAPI.fetchListOfQuestion( | ||
| questionId: Int(question.questionId), | ||
| threshold: threshold, | ||
| pageSize: 30, |
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.
페이지 사이즈가 30이어도 전부 불러올 수 있을 것 같네요 ㅎㅎ
thinkySide
left a comment
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.
비슷한 기능들일 수 있었지만 사소하게 챙겨야할 디테일(+기획쪽으로 누락된 부분)이 많았었는데, 꼼꼼하게 잘 구현해주셔서 감사합니다! 👍 👍 👍
코멘트 남긴 오늘의 인기 답변 조회 의존성 함수 수정 관련 해서만 한번 체크 부탁드립니다!
OhMyungJin
left a comment
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.
인기 답변 추출 로직이 이해가 잘 되어서 좋네요!
LGTM! 수고하셨습니당
| publishedDate: question.livedAt?.ISO8601ToDate(.yearMonthDateTime) ?? .now, | ||
| isAnswered: question.isAnswered, | ||
| isLived: question.questionStatus == ("LIVE") | ||
| let currentQuestion = question ?? Question( |
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.
question이 nil이면 메인 질문이 들어가는 군요 ㅎㅎㅎ 좋습니다!
close #368
TO-DO
상세 설명
오늘의 인기 답변 추출 비즈니스 로직 구현
AnswerRepository에fetchPopularAnswer라는 이름의 메소드로 만들었습니다.구현 방식은
오늘의 인기 답변 UI 구현
기존에 만들어놓은게 있는지 모르고 새로 만들었습니다 ㅎㅎ;;
만들어놓은게 아까워서 그냥 새로 만든 걸로 넣어놨습니다!
인기 답변답변 모으는 기간답변이 없을 때API 누락된 부분