@@ -17,7 +17,7 @@ const {
1717 progressRankBgColor,
1818} = {
1919 hdevApiKey :
20- urlParams . get ( "hdevApiKey" ) ,
20+ urlParams . get ( "hdevApiKey" ) ,
2121 textColor : urlParams . get ( "textColor" ) . replace ( "#" , "" ) ,
2222 primaryColor : urlParams . get ( "primaryColor" ) . replace ( "#" , "" ) ,
2323 bgColor : urlParams . get ( "bgColor" ) . replace ( "#" , "" ) ,
@@ -92,7 +92,7 @@ async function getPlayerInformation(region, puuid, hdevApiKey) {
9292
9393async function getLeaderboard ( region , puuid , hdevApiKey ) {
9494 const response = await fetch (
95- `${ apiUrl } /v1/leaderboard/${ region } ?puuid=${ puuid } ? api_key=${ hdevApiKey } ` ,
95+ `${ apiUrl } /v1/leaderboard/${ region } ?puuid=${ puuid } & api_key=${ hdevApiKey } ` ,
9696 ) ;
9797 const data = await response . json ( ) ;
9898 return data . status === 404 ? " " : data . data [ 0 ] . leaderboardRank ;
@@ -143,7 +143,7 @@ async function updatePlayerCard(region, puuid, hdevApiKey) {
143143 if ( playerLastGamePts === "nRanked" ) {
144144 playerRank . innerHTML = playerElo ;
145145 } else if ( playerTier === 27 ) {
146- const leaderboardRank = await getLeaderboard ( region , puuid ) ;
146+ const leaderboardRank = await getLeaderboard ( region , puuid , hdevApiKey ) ;
147147 if ( leaderboardRank !== " " ) {
148148 playerRank . innerHTML = `${ playerElo } #${ leaderboardRank } ` ;
149149 }
@@ -247,7 +247,7 @@ async function getWonInfo(puuid, dataMatches, hdevApiKey) {
247247
248248async function getMatches ( region , puuid , hdevApiKey ) {
249249 const response = await fetch (
250- `${ apiUrl } /v3/by-puuid/matches/${ region } /${ puuid } ?filter=competitive&size=1? api_key=${ hdevApiKey } ` ,
250+ `${ apiUrl } /v3/by-puuid/matches/${ region } /${ puuid } ?filter=competitive&size=1& api_key=${ hdevApiKey } ` ,
251251 ) ;
252252 return await response . json ( ) ;
253253}
0 commit comments