From 46604e08f622df7e3e5b62ef4ce8074cfc62283b Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Mon, 14 Oct 2024 17:14:44 +0300 Subject: [PATCH] update server.js to handle link group name submission --- script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index de4c49a..6a82883 100644 --- a/script.js +++ b/script.js @@ -9,6 +9,7 @@ const form = document.getElementById('merge-form'); const newCalendar = document.createElement('div'); newCalendar.className = 'calendar'; newCalendar.innerHTML = ` + @@ -22,6 +23,7 @@ const form = document.getElementById('merge-form'); event.preventDefault(); const calendarsData = []; for (let i = 0; i < calendarIndex; i++) { + const linkGroupName = document.getElementById(`link-group-name-${i}`).value; const prefix = document.getElementById(`prefix-${i}`).value; const override = document.getElementById(`override-${i}`).checked; const url = document.getElementById(`url-${i}`).value; @@ -42,7 +44,7 @@ const form = document.getElementById('merge-form'); console.error(error); result.innerHTML = 'Error merging calendars'; }); - + // Send the input data to the server fetch('/add-links', { method: 'POST',