황성연

이미지 경로 수정

......@@ -67,24 +67,15 @@ module.exports = function(app){
for(var i=0; i < champions_length; i++){
champ_point[i] = (info_champ_json[i]["championPoints"]);
champ_id[i] = info_champ_json[i]["championId"];
}
var rotationUrl = "https://kr.api.riotgames.com/lol/platform/v3/champion-rotations?api_key="+apikey;
request(rotationUrl,function(error,response,body){
var info_rotation = JSON.parse(body);
var keys = Object.keys(info_rotation);
for(var k =0; k < info_rotation[keys[0]].length;k++)
{
rotation_champ[k] = info_rotation[keys[0]][k];
console.log("rotation_champ:"+rotation_champ[k]);
console.log("로테길이:"+rotation_champ.length);
}
for(var k =0; k < info_rotation[keys[1]].length;k++)
{
rotation_champ_newbie[k] = info_rotation[keys[1]][k];
console.log("rotation_champ:"+rotation_champ_newbie[k]);
console.log("로테길이:"+rotation_champ_newbie.length);
}
......@@ -143,23 +134,23 @@ module.exports = function(app){
var leaguePoints = info_user_league_json[0]["leaguePoints"];
var img_tier;
if(tier == "MASTER"){
img_tier = "https://i.imgur.com/nvQjonh.png";
img_tier = "/ranked-emblems/Emblem_Master.png";
}else if(tier == "CHALLENGER"){
img_tier = "https://i.imgur.com/sbK1Edj.png";
img_tier = "/ranked-emblems/Emblem_Challenger.png";
}else if(tier == "DIAMOND"){
img_tier = "https://i.imgur.com/5VBu8PF.png"
img_tier = "/ranked-emblems/Emblem_Diamond.png"
}else if(tier == "PLATINUM"){
img_tier = "https://i.imgur.com/Eqi6858.png"
img_tier = "/ranked-emblems/Emblem_Platinum.png"
}else if(tier == "GRANDMASTER"){
img_tier = "https://i.imgur.com/mcEhz1o.png"
img_tier = "/ranked-emblems/Emblem_Grandmaster.png"
}else if(tier == "GOLD"){
img_tier = "https://i.imgur.com/Ec4hPuO.png"
img_tier = "/ranked-emblems/Emblem_Gold.png"
}else if(tier == "SILVER"){
img_tier = "https://i.imgur.com/GKnPu7s.png"
img_tier = "/ranked-emblems/Emblem_Silver.png"
}else if(tier == "BRONZE"){
img_tier ="https://i.imgur.com/TPZVXIr.png"
img_tier ="/ranked-emblems/Emblem_Bronze.png"
}else{
img_tier = "https://i.imgur.com/kcdoC4r.png"
img_tier = "/ranked-emblems/Emblem_Iron.png"
}
}
champ_name[champ_name.length] = "total";
......@@ -275,8 +266,6 @@ module.exports = function(app){
};
}
console.log(spectator);
var matchUrl = "https://kr.api.riotgames.com/lol/match/v4/matchlists/by-account/" + accountId + "?api_key=" + apikey;
request(matchUrl,function(error,response,body) {
var match_json = JSON.parse(body).matches;
......@@ -630,6 +619,8 @@ module.exports = function(app){
res.render('index', { title: req.params.username ,
c_id: champ_id,
c_name: champ_name,
......