Explorar el Código

add leagueName

flyzto hace 4 días
padre
commit
b26717a1d7
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      pinnacle/libs/syncData.js

+ 2 - 2
pinnacle/libs/syncData.js

@@ -143,11 +143,11 @@ const getStraightFixtures = async () => {
     }
     GLOBAL_DATA.straightFixturesVersion = last;
     const games = league?.map(league => {
-      const { id: leagueId, events } = league;
+      const { id: leagueId, name: leagueName, events } = league;
       return events?.map(event => {
         const { starts } = event;
         const timestamp = new Date(starts).getTime();
-        return { leagueId, ...event, timestamp };
+        return { leagueId, leagueName, ...event, timestamp };
       });
     })
     .flat() ?? [];