diff --git a/index.mjs b/index.mjs index b200fbc..d042c3e 100644 --- a/index.mjs +++ b/index.mjs @@ -5,6 +5,7 @@ const METHOD_KEY = RiotAPITypes.METHOD_KEY; /** @type {RiotAPITypes.Config} */ const config = { + debug: false, cache: { cacheType: "ioredis", // local or ioredis client: "redis://redis:6379", // leave null if client is local @@ -34,14 +35,12 @@ const ice = await rAPI.summoner }) .then(({ name, puuid }) => ({ name, puuid })); -console.log(`${JSON.stringify(val, null, " ")}`); -console.log(`${JSON.stringify(ice, null, " ")}`); - const valGames = await get_games_by_puuid(val.puuid); const iceGames = await get_games_by_puuid(ice.puuid); const commonGames = valGames.filter(Set.prototype.has, new Set(iceGames)); +console.log(`Common Games Found: ${commonGames.length}`); console.log(`${JSON.stringify(commonGames, null, " ")}`); /** @@ -53,10 +52,9 @@ async function get_games_by_puuid(puuid) { let start = 0; while (start >= 0) { - console.log(`getting entries ${start}-${start + 19}`); let newGames = await rAPI.matchV5.getIdsByPuuid({ cluster: PlatformId.AMERICAS, - puuid: val.puuid, + puuid, params: { start, }, diff --git a/package.json b/package.json index 240ff74..48bd691 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.mjs", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "DEBUG=riotapi* node --no-deprecation index.mjs" + "start": "node --no-deprecation index.mjs" }, "author": "", "license": "MIT", @@ -14,10 +14,5 @@ }, "devDependencies": { "nodemon": "^3.0.3" - }, - "nodemonConfig": { - "env": { - "DEBUG": "riotapi*" - } } }