.
This commit is contained in:
1 parent
c5d296d403
commit
2250b6072e
22 files changed
+1719
-42
No files matched your search
@@ -16,6 +16,7 @@ import {
|
||||
} from '../global/database/schema';
|
||||
import { RiotAccountEnrichmentService } from '../riot/riot-account-enrichment.service';
|
||||
import { TournamentCodeService } from '../tournament-code/tournament-code.service';
|
||||
import { TournamentResultService } from '../tournament-result/tournament-result.service';
|
||||
|
||||
const AUCTION_MAX_TEAM_SIZE = 5;
|
||||
|
||||
@@ -45,6 +46,7 @@ export class AuctionService {
|
||||
private readonly connectionService: ConnectionService,
|
||||
private readonly enrichmentService: RiotAccountEnrichmentService,
|
||||
private readonly tournamentCodeService: TournamentCodeService,
|
||||
private readonly tournamentResultService: TournamentResultService,
|
||||
) {}
|
||||
|
||||
public async start(params: StartAuctionParams): Promise<AuctionDocument> {
|
||||
@@ -178,6 +180,7 @@ export class AuctionService {
|
||||
match.teamBuiltAt = match.teamBuiltAt ?? new Date();
|
||||
await match.save();
|
||||
await this.tournamentCodeService.reserveForMatch(match);
|
||||
await this.tournamentResultService.scheduleInitialPoll(match);
|
||||
|
||||
return auction;
|
||||
}
|
||||
@@ -321,6 +324,8 @@ export class AuctionService {
|
||||
match.teams = [];
|
||||
match.tournamentCodeIds = [];
|
||||
match.teamBuiltAt = undefined;
|
||||
match.result = undefined;
|
||||
match.resultPollState = undefined;
|
||||
await match.save({ session });
|
||||
}
|
||||
await session.commitTransaction();
|
||||
@@ -403,6 +408,7 @@ export class AuctionService {
|
||||
match.teamBuiltAt = match.teamBuiltAt ?? new Date();
|
||||
await match.save();
|
||||
await this.tournamentCodeService.reserveForMatch(match);
|
||||
await this.tournamentResultService.scheduleInitialPoll(match);
|
||||
}
|
||||
|
||||
private resolveTeamName(side: TeamSide): string {
|
||||
|
||||
Reference in new issue
Block a user