20-calendar-system #37

Merged
Ajdj100 merged 25 commits from 20-calendar-system into main 2025-11-28 00:06:10 -06:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 941004f913 - Show all commits

View File

@@ -54,7 +54,6 @@ r.get('/:id', async (req: Request, res: Response) => {
let details: CalendarEvent = await getEventDetails(eventID);
details.eventSignups = await getEventAttendance(eventID);
console.log(details);
res.status(200).json(details);
} catch (err) {
console.error('Insert failed:', err);
@@ -68,6 +67,8 @@ r.post('/', async (req: Request, res: Response) => {
try {
const member = req.user.id;
let event: CalendarEvent = req.body;
event.start = new Date(event.start);
event.end = new Date(event.end);
console.log(event);
createEvent(event);
res.sendStatus(200);

View File

@@ -26,7 +26,6 @@ export async function updateEvent(eventObject: CalendarEvent) {
if (!eventObject.id) {
throw new Error("updateEvent: Missing event ID.");
}
const sql = `
UPDATE calendar_events
SET