Fix API update issue
All checks were successful
pipeline / build-and-push-images (push) Successful in 4m10s
pipeline / deploy (push) Successful in 36s

This commit is contained in:
2025-06-26 10:31:38 +02:00
parent d27bd6d3a4
commit dc1cd42ec2

View File

@@ -26,7 +26,7 @@ async function main() {
let i = 0;
for(let challenger of challengerLeague.entries) {
console.log("Entry " + i + "/" + challengerLeague.entries.length + " ...")
const puuid = await summonerPuuid(challenger.summonerId);
const puuid = challenger.puuid;
const challengerGameList = await summonerGameList(puuid, latestPatchTime);
for(let game of challengerGameList) {
if(!gameList.includes(game) && !alreadySeenGameList.includes(game)) {
@@ -103,16 +103,6 @@ async function fetchChallengerLeague() {
return challengerLeague;
}
async function summonerPuuid(summonerId) {
const endpoint = `/lol/summoner/v4/summoners/${summonerId}`
const url = `${base}${endpoint}?api_key=${api_key}`
const puuidResponse = await handleRateLimit(new URL(url));
handleError(puuidResponse)
const puuidJson = await puuidResponse.json();
return puuidJson.puuid;
}
async function summonerGameList(puuid, startTime) {
const base = "https://europe.api.riotgames.com"
const endpoint = `/lol/match/v5/matches/by-puuid/${puuid}/ids`;