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