From 1d4e4400933f39df04c616b8c4ef345fe584d884 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Fri, 25 Oct 2024 14:45:34 +0300 Subject: [PATCH] ensure path to the JSON file is absolute --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index dd159fc..0b824df 100644 --- a/server.js +++ b/server.js @@ -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