diff --git a/ProjectSourceCode/src/resources/js/scoreboard-header/current-match-routes.js b/ProjectSourceCode/src/resources/js/scoreboard-header/current-match-routes.js index e8b5269..11ece5d 100644 --- a/ProjectSourceCode/src/resources/js/scoreboard-header/current-match-routes.js +++ b/ProjectSourceCode/src/resources/js/scoreboard-header/current-match-routes.js @@ -13,13 +13,13 @@ const fetchMatchesData = async (req, res, next) => { const yesterday = yesterdayUnformatted.format('YYYY-MM-DD'); // Array of years to fetch matches data - const league_id = [2021, 2002, 2014, 2019, 2015, 2013]; + const league_ids = [2021, 2002, 2014, 2019, 2015, 2013]; // Array to store all matches data let allMatches = []; // Loop through each year and fetch matches data - for (const year of years) { + for (const league_id of league_ids) { const response = await axios({ url: `http://api.football-data.org/v4/competitions/${league_id}/matches`, method: 'GET',