forked from ryanmwangi/CalMerger
ensure path to the JSON file is absolute
This commit is contained in:
parent
9420ce1cce
commit
1d4e440093
|
@ -110,7 +110,7 @@ END:VEVENT
|
||||||
app.get('/calendar/:name', async (req, res) => {
|
app.get('/calendar/:name', async (req, res) => {
|
||||||
const calendarName = req.params.name;
|
const calendarName = req.params.name;
|
||||||
const icsFilePath = path.resolve(MERGED_CALENDARS_DIR, `${calendarName}.ics`);
|
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 {
|
try {
|
||||||
// Check if the .ics file exists
|
// Check if the .ics file exists
|
||||||
|
|
Loading…
Reference in New Issue