Remove Flex 3v3 stats and tmp file from Riot application

This commit is contained in:
Valentin Kaelin 2019-08-23 00:57:06 +02:00
parent 84eae5380f
commit 1846f84491
2 changed files with 1 additions and 2 deletions

View file

@ -1 +0,0 @@
a045114f-3d93-45ad-a4c2-27fa82d7eadb

View file

@ -95,7 +95,7 @@ const getAccountInfos = function (res) {
const getRanked = function (res) {
request(`https://${data.region}.api.riotgames.com/lol/league/v4/entries/by-summoner/${data.summonerID}?api_key=${data.key}`, function (error, response, body) {
if (!error && response.statusCode == 200) {
let JSONBody = JSON.parse(body).filter(e => e.queueType !== 'RANKED_TFT');
let JSONBody = JSON.parse(body).filter(e => e.queueType !== 'RANKED_TFT' && e.queueType !== 'RANKED_FLEX_TT');
if (JSONBody.length > 0) {
data.finalJSON.push(...JSONBody);
if (JSONBody.length === 1) data.finalJSON.push(null);