Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Creiger committed Nov 23, 2023
1 parent e37b4f1 commit c53a9d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/services/clubs/clubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const fetchMatches = async (app: Application) => {
for (const clubId of clubs) {
for (const matchType of matchTypes) {
const clubUrl = `${eaUrl}?platform=common-gen5&matchType=${matchType}&clubIds=${clubId}`;
console.log(clubUrl);
try {
const response = await axios.get(clubUrl, {
headers: {
Expand All @@ -53,6 +54,7 @@ const fetchMatches = async (app: Application) => {
},
});
let matches = response.data;
console.log(matches);
for (const match of matches) {
match.createdAt = new Date(match.timestamp * 1000);
match.matchType = matchType;
Expand All @@ -61,6 +63,7 @@ const fetchMatches = async (app: Application) => {
}
newMatches.push(...matches.filter((m: any ) => !(new Set(newMatches.map((nm: any) => nm.matchId)).has(m.matchId))));
} catch (error) {
console.log(error);
}
}
}
Expand Down

0 comments on commit c53a9d0

Please sign in to comment.