forked from lucaspatenaude/ScoreSpot
Styling added to cards
This commit is contained in:
@@ -9,6 +9,9 @@ const convert_time = (req, res, next) => {
|
||||
if (match.minute === "FINISHED") {
|
||||
match.minute = "FT";
|
||||
}
|
||||
else if (match.minute === "TIMED") {
|
||||
match.minute = "TM";
|
||||
}
|
||||
return match;
|
||||
});
|
||||
|
||||
|
||||
@@ -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 league_ids = [2021, 2002, 2014, 2019, 2015, 2013];
|
||||
const league_ids = [2021]; /* Readd , 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 league_id of league_ids) {
|
||||
const response = await axios({
|
||||
url: `http://api.football-data.org/v4/competitions/${league_id}/matches`,
|
||||
url: `http://api.football-data.org/v4/competitions/2021/matches`, /* Resinsert ${league_id} for 2021 */
|
||||
method: 'GET',
|
||||
params: {
|
||||
dateFrom: yesterday, // Set dateFrom to yesterday's date
|
||||
|
||||
Reference in New Issue
Block a user