feat: connect tournament views to APIs and recover archived stats

Remove development previews and complete hall of fame, match history, official results, and multi-kill API integration.

Fix active match pagination and team-ready controls, preserve basic scoreboards, and recover statistics when Riot archives arrive.

Use bounded in-process cache invalidation retries and add the Riot match lookup index migration with regression coverage.
This commit is contained in:
dahyeon committed 2026-11-11 02:00:35 +09:00
1 parent 20e1e6ec04
commit 0d7617e2d2
70 files changed
+3739 -1793

No files matched your search

@@ -1,5 +1,6 @@
import {
BadRequestException,
ForbiddenException,
ConflictException,
Injectable,
InternalServerErrorException,
@@ -795,6 +796,10 @@ export class AuctionService {
}
const team = this.findAuctionTeamByIndex(auction, params.teamIndex);
if (!team) throw new BadRequestException('Unknown team.');
this.assertBidderIsCaptain(
params.bidderUserId,
team.captainUserId.toString(),
);
if (params.amount <= auction.currentBid) {
throw new BadRequestException('Bid must exceed current bid.');
}
@@ -807,8 +812,6 @@ export class AuctionService {
'Bid must reserve minimum points for remaining slots.',
);
}
// 임시 운영용: 클라이언트에서 선택한 팀장 모드를 신뢰하고 실제 로그인 사용자 검증은 건너뛴다.
await this.recordSnapshot(auction, 'bid', params.bidderUserId);
auction.currentBid = params.amount;
auction.currentBidderTeamIndex = params.teamIndex;
@@ -929,6 +932,10 @@ export class AuctionService {
if (!bidContext.bidderTeamCaptainUserId) {
throw new BadRequestException('Unknown team.');
}
this.assertBidderIsCaptain(
params.bidderUserId,
bidContext.bidderTeamCaptainUserId,
);
const auctionLifecycleId =
params.clientObservedAuctionLifecycleId ?? bidContext.auctionLifecycleId;
@@ -1005,6 +1012,10 @@ export class AuctionService {
(entry) => Number(entry.teamIndex) === params.teamIndex,
);
if (!team) throw new BadRequestException('Unknown team.');
this.assertBidderIsCaptain(
params.bidderUserId,
this.stringFromState(team.captainUserId),
);
const auctionLifecycleId =
params.clientObservedAuctionLifecycleId ??
@@ -2906,6 +2917,15 @@ export class AuctionService {
return auction.teams.find((team) => team.teamIndex === teamIndex);
}
private assertBidderIsCaptain(
bidderUserId: mongoose.Types.ObjectId | undefined,
captainUserId: string,
) {
if (bidderUserId && bidderUserId.toString() !== captainUserId) {
throw new ForbiddenException('해당 팀의 팀장만 입찰할 수 있습니다.');
}
}
private createDeadline(secondsFromNow: number): Date {
return new Date(Date.now() + secondsFromNow * 1000);
}