Conversation
buildFinishedBattleState 추가 : 결과/메트릭/투표 타임라인/타임라인/MVP를 Active 배틀을 기반으로 계산해 finishedBattleState 구성 buildTimeline 추가: 공격/방어 기록을 타임라인을 변환 후 시간순 정렬 getBattleResult에서 finishedBattles에 없을 경우 badRequest 반환 totalChats 계산 : all + teamA + teamB
HoonDongKang
approved these changes
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 관련 이슈
Closes #174
✅ 작업 내용
배틀 종료 후 결과를 목데이터가 아닌 종료 스냅샷으로 반환하도록 백엔드 로직을 전환했고 metrics.totalChats를 추가해 채팅 총 개수을 제공하도록 확장했습니다. DTO/타입, 테스트 수정 반영했습니다.
backend/src/battles/service/battles.service.ts
backend/src/battles/types/battleResult.types.ts
backend/src/battles/dto/battleResult.dto.ts
backend/src/battles/dto/closedBattleResponse.dto.ts
💡개선 사항
📸 참고 사항
Get /battles/:8/result💬 질문사항 (고민했던 부분)