소스 검색

add leagueName

flyzto 4 일 전
부모
커밋
b26717a1d7
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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() ?? [];