Skip to content

Commit

Permalink
Fix save shows instead of 'showsByDate' map
Browse files Browse the repository at this point in the history
  • Loading branch information
niemisami committed Oct 24, 2023
1 parent 8fe6e82 commit 3171846
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions google/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const fetchShowlist = async (): Promise<{
);
const weekKeys = generateWeekObj(showsByDate);

saveShowlistJson(showsByDate);
saveShowlistJson(shows);
return { showsByDate, weekKeys };
};

Expand Down Expand Up @@ -226,5 +226,5 @@ const generateWeekObj = (showsByDate: Record<string, Show[]>) => {
return weekObj;
};

const saveShowlistJson = (showsByDate: Record<string, Show[]>) =>
writeFile(`${FILE_URL}/ohjelmakartta.json`, JSON.stringify(showsByDate));
const saveShowlistJson = (shows: Show) =>
writeFile(`${FILE_URL}/ohjelmakartta.json`, JSON.stringify(shows));

0 comments on commit 3171846

Please sign in to comment.