1
0
Fork 0

Function to add a new link group

This commit is contained in:
Ryan Mwangi 2024-10-12 01:08:32 +03:00
parent d7de5841d0
commit 77136f1a14
1 changed files with 16 additions and 0 deletions

View File

@ -103,6 +103,22 @@ app.get('/:filename', (req, res) => {
// Store the merged calendar URL in a file
const mergedCalendarUrlFile = 'merged_calendar_url.txt';
//calendarData object to store calendar data
let calendarData = {
linkGroups: []
};
// Function to add a new link group
function addLinkGroup(name) {
const newLinkGroup = {
name,
links: []
};
calendarData.linkGroups.push(newLinkGroup);
return newLinkGroup;
}
// Function to update the merged calendar
async function updateMergedCalendar(){
try {