feat: add the 5 new asian regions

This commit is contained in:
Kalane 2023-01-10 15:58:41 +01:00
parent dd1b993eba
commit c627a2d26d
No known key found for this signature in database
GPG key ID: B389A4E3DFF8E414
4 changed files with 23 additions and 3 deletions

View file

@ -73,7 +73,12 @@ export default {
'NA', 'NA',
'OCE', 'OCE',
'TR', 'TR',
'RU' 'RU',
'PH',
'SG',
'TH',
'TW',
'VN',
], ],
} }
}, },

View file

@ -30,7 +30,12 @@ export default new Vuex.Store({
'na': 'na1', 'na': 'na1',
'oce': 'oc1', 'oce': 'oc1',
'tr': 'tr1', 'tr': 'tr1',
'ru': 'ru' 'ru': 'ru',
'ph': 'ph2',
'sg': 'sg2',
'th': 'th2',
'tw': 'tw2',
'vn': 'vn2',
}, },
roles: ['TOP', 'JUNGLE', 'MIDDLE', 'BOTTOM', 'UTILITY'] roles: ['TOP', 'JUNGLE', 'MIDDLE', 'BOTTOM', 'UTILITY']
}, },

View file

@ -29,7 +29,7 @@ class MatchService {
console.log('--> CALL TO RIOT MATCHLIST') console.log('--> CALL TO RIOT MATCHLIST')
const newMatchList = await Jax.Matchlist.puuid(puuid, region, index) const newMatchList = await Jax.Matchlist.puuid(puuid, region, index)
// Error while fetching Riot API // Error while fetching Riot API
if (!newMatchList) { if (!newMatchList || !newMatchList.length) {
return matchList return matchList
} }
matchList = [...matchList, ...newMatchList] matchList = [...matchList, ...newMatchList]

View file

@ -13,6 +13,11 @@ export enum LeagueRegion {
RUSSIA = 'ru', RUSSIA = 'ru',
TURKEY = 'tr1', TURKEY = 'tr1',
JAPAN = 'jp1', JAPAN = 'jp1',
PHILIPPINES = 'ph2',
SINGAPORE = 'sg2',
THAILAND = 'th2',
TAIWAN = 'tw2',
VIETNAM = 'vn2',
} }
/** /**
@ -40,6 +45,11 @@ export function getRiotRegion(region: string): RiotRegion {
case LeagueRegion.LATIN_AMERICA_SOUTH: case LeagueRegion.LATIN_AMERICA_SOUTH:
return RiotRegion.AMERICAS return RiotRegion.AMERICAS
case LeagueRegion.OCEANIA: case LeagueRegion.OCEANIA:
case LeagueRegion.PHILIPPINES:
case LeagueRegion.SINGAPORE:
case LeagueRegion.THAILAND:
case LeagueRegion.TAIWAN:
case LeagueRegion.VIETNAM:
return RiotRegion.SEA return RiotRegion.SEA
case LeagueRegion.KOREA: case LeagueRegion.KOREA:
case LeagueRegion.JAPAN: case LeagueRegion.JAPAN: