[#4] event url is now stored and reused when updating event to prevent duplication

This commit is contained in:
Camille Moussu
2025-08-25 09:47:43 +02:00
parent 4e31b2666c
commit 684fd82027
5 changed files with 39 additions and 33 deletions
+3 -1
View File
@@ -8,7 +8,8 @@ type RawEntry = [string, Record<string, string>, string, any];
export function parseCalendarEvent(
data: RawEntry[],
color: string,
calendarid: string
calendarid: string,
eventURL: string
): CalendarEvent {
const event: Partial<CalendarEvent> = { color, attendee: [] };
let recurrenceId;
@@ -75,6 +76,7 @@ export function parseCalendarEvent(
event.uid = `${event.uid}/${recurrenceId}`;
}
event.URL = eventURL;
if (!event.uid || !event.start) {
console.error(
`missing crucial event param in calendar ${calendarid} `,