Implemented update event systems

This commit is contained in:
2025-11-27 23:10:20 -05:00
parent 9896a9289a
commit f82a750cee
7 changed files with 70 additions and 14 deletions

View File

@@ -83,7 +83,18 @@ export async function createCalendarEvent(eventData: CalendarEvent) {
}
export async function editCalendarEvent(eventData: CalendarEvent) {
let res = await fetch(`${addr}/calendar`, {
method: "PUT",
credentials: "include",
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(eventData)
});
if (res.ok) {
return;
} else {
throw new Error(`Failed to set attendance: ${res.status} ${res.statusText}`);
}
}
export async function setCancelCalendarEvent(eventID: number, cancel: boolean) {