add logging to ensure file saving logic is working
This commit is contained in:
parent
88ab9c53a1
commit
3f2fb01bf1
|
@ -100,7 +100,9 @@ app.post('/merge', async (req, res) => {
|
||||||
|
|
||||||
|
|
||||||
// Save the calendar to a file
|
// Save the calendar to a file
|
||||||
fs.writeFileSync(`${MERGED_CALENDARS_DIR}/${filename}`, calendar.toString());
|
const filePath = `${MERGED_CALENDARS_DIR}/${filename}`;
|
||||||
|
fs.writeFileSync(filePath, calendar.toString());
|
||||||
|
console.log(`Calendar saved to ${filePath}`);
|
||||||
|
|
||||||
// Save the user input and sanitizedLinkGroupName in a separate JSON file
|
// Save the user input and sanitizedLinkGroupName in a separate JSON file
|
||||||
saveCalendarData(sanitizedLinkGroupName, linkGroupName, calendars);
|
saveCalendarData(sanitizedLinkGroupName, linkGroupName, calendars);
|
||||||
|
|
Loading…
Reference in New Issue