From cc5ab4227aa1fa79c476fc4197ac221dd722780e Mon Sep 17 00:00:00 2001 From: Kfir Dayan Date: Tue, 28 Mar 2023 17:32:32 +0300 Subject: [PATCH] done to output.ics --- src/Ics.ts | 4 ++-- src/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ics.ts b/src/Ics.ts index 21c9c1a..2f66c3d 100644 --- a/src/Ics.ts +++ b/src/Ics.ts @@ -1,7 +1,7 @@ import { GoogleCalendarEvent } from "./types"; import * as ics from 'ics'; -const uuid = require('uuid').v4; +const uuid = require('uuid').v4(); export default class Ics { @@ -34,7 +34,7 @@ export default class Ics { alarms: [], categories: [], organizer: { name: 'Maccabi Haifa F.C.', email: '' }, - uid: uuid + uid: uuid.toString(), }; const { error, value } = ics.createEvent(icsEvent); diff --git a/src/index.ts b/src/index.ts index 0568daa..b1a1df8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,7 +36,7 @@ const app = new App(); const start = async () => { const games = await app.gameSource.getGamesFromHaifa(); const icsEvents = app.ics.generateIcsOutputFromGames(games); - console.log(icsEvents) + fs.writeFileSync('output.ics', icsEvents); }