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

@@ -34,7 +34,7 @@ export async function updateEvent(eventObject: CalendarEvent) {
end = ?,
location = ?,
color = ?,
description = ?,
description = ?
WHERE id = ?
`;
@@ -54,7 +54,6 @@ export async function updateEvent(eventObject: CalendarEvent) {
export async function setEventCancelled(eventID: number, cancelled: boolean) {
const input = cancelled ? 1 : 0;
console.log(cancelled, input);
const sql = `
UPDATE calendar_events
SET cancelled = ?
@@ -73,7 +72,6 @@ export async function getShortEventsInRange(startDate: string, endDate: string):
ORDER BY start ASC
`;
const res: CalendarEventShort[] = await pool.query(sql, [startDate, endDate]);
console.log(res);
return res;
}