diff --git a/match_collector/index.ts b/match_collector/index.ts index 3ca90b2..0bb97a8 100644 --- a/match_collector/index.ts +++ b/match_collector/index.ts @@ -72,8 +72,10 @@ async function main() { i = 0 for (const game of gameList) { console.log('Entry ' + i + '/' + gameList.length + ' ...') - // Determine region from matchId (format: REGION_matchId) - const matchRegion = game.split('_')[0] + // Determine region from matchId (format: PLATFORM_matchId) + // Map platform prefix to regional routing value for match API + const matchPlatformPrefix = game.split('_')[0] + const matchRegion = PLATFORMS[matchPlatformPrefix] || region const gameMatch = await match(game, matchRegion) const gameTimeline = await matchTimeline(game, matchRegion) gameMatch.timeline = gameTimeline