fix/match_collector: fix platform routing for match api
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user