fix/match_collector: fix platform routing for match api
This commit is contained in:
@@ -72,8 +72,10 @@ async function main() {
|
|||||||
i = 0
|
i = 0
|
||||||
for (const game of gameList) {
|
for (const game of gameList) {
|
||||||
console.log('Entry ' + i + '/' + gameList.length + ' ...')
|
console.log('Entry ' + i + '/' + gameList.length + ' ...')
|
||||||
// Determine region from matchId (format: REGION_matchId)
|
// Determine region from matchId (format: PLATFORM_matchId)
|
||||||
const matchRegion = game.split('_')[0]
|
// 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 gameMatch = await match(game, matchRegion)
|
||||||
const gameTimeline = await matchTimeline(game, matchRegion)
|
const gameTimeline = await matchTimeline(game, matchRegion)
|
||||||
gameMatch.timeline = gameTimeline
|
gameMatch.timeline = gameTimeline
|
||||||
|
|||||||
Reference in New Issue
Block a user