1
0
Fork 0

ensure path to the JSON file is absolute

This commit is contained in:
Ryan Mwangi 2024-10-25 14:45:34 +03:00
parent 9420ce1cce
commit 1d4e440093
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ END:VEVENT
app.get('/calendar/:name', async (req, res) => {
const calendarName = req.params.name;
const icsFilePath = path.resolve(MERGED_CALENDARS_DIR, `${calendarName}.ics`);
const jsonFilePath = path.join(MERGED_CALENDARS_DIR, `${calendarName}.json`);
const jsonFilePath = path.resolve(MERGED_CALENDARS_DIR, `${calendarName}.json`);
try {
// Check if the .ics file exists