fix: preserve literal types for mongoose queries and seed data
This commit is contained in:
1 parent
fbf22284e8
commit
2d8027cb16
3 files changed
+6
-6
No files matched your search
@@ -317,11 +317,11 @@ function buildMatchPayload(
|
|||||||
description:
|
description:
|
||||||
'결과 페이지 검증용으로 생성된 30명, 6팀, 15경기 완료 임시 데이터입니다.',
|
'결과 페이지 검증용으로 생성된 30명, 6팀, 15경기 완료 임시 데이터입니다.',
|
||||||
mapId: 11,
|
mapId: 11,
|
||||||
status: 'finished',
|
status: 'finished' as const,
|
||||||
scheduledAt: options.scheduledAt,
|
scheduledAt: options.scheduledAt,
|
||||||
maxParticipants: TOTAL_PLAYERS,
|
maxParticipants: TOTAL_PLAYERS,
|
||||||
gameCount: GAME_COUNT_PER_SERIES_GROUP,
|
gameCount: GAME_COUNT_PER_SERIES_GROUP,
|
||||||
gameMode: 'round-robin',
|
gameMode: 'round-robin' as const,
|
||||||
tournamentCodeIds: [],
|
tournamentCodeIds: [],
|
||||||
teamBuiltAt: new Date(options.scheduledAt.getTime() - 30 * 60000),
|
teamBuiltAt: new Date(options.scheduledAt.getTime() - 30 * 60000),
|
||||||
participants,
|
participants,
|
||||||
@@ -336,10 +336,10 @@ function buildMatchPayload(
|
|||||||
resultPollState: {
|
resultPollState: {
|
||||||
startedAt: new Date(options.scheduledAt.getTime() + 2 * 60 * 60 * 1000),
|
startedAt: new Date(options.scheduledAt.getTime() + 2 * 60 * 60 * 1000),
|
||||||
lastPolledAt: now,
|
lastPolledAt: now,
|
||||||
lastPollOutcome: 'matched',
|
lastPollOutcome: 'matched' as const,
|
||||||
matchedCount: games.length,
|
matchedCount: games.length,
|
||||||
expandedToAllPuuids: true,
|
expandedToAllPuuids: true,
|
||||||
state: 'complete',
|
state: 'complete' as const,
|
||||||
},
|
},
|
||||||
legacyImported: true,
|
legacyImported: true,
|
||||||
legacyImportSource: {
|
legacyImportSource: {
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ export class TournamentCodeService {
|
|||||||
): Promise<MatchDocument[]> {
|
): Promise<MatchDocument[]> {
|
||||||
const MatchModel = await this.connectionService.getModel('match');
|
const MatchModel = await this.connectionService.getModel('match');
|
||||||
const filter: {
|
const filter: {
|
||||||
status: { $in: string[] };
|
status: { $in: MatchDocument['status'][] };
|
||||||
communityId?: mongoose.Types.ObjectId;
|
communityId?: mongoose.Types.ObjectId;
|
||||||
} = {
|
} = {
|
||||||
status: { $in: ['team-built', 'in-progress'] },
|
status: { $in: ['team-built', 'in-progress'] },
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ export class CompetitionOutboxProcessor
|
|||||||
function leaseFilter(event: ClaimedOutboxEvent) {
|
function leaseFilter(event: ClaimedOutboxEvent) {
|
||||||
return {
|
return {
|
||||||
_id: event._id,
|
_id: event._id,
|
||||||
state: 'pending',
|
state: 'pending' as const,
|
||||||
attemptCount: event.attemptCount,
|
attemptCount: event.attemptCount,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user