Finished first pass of event creation system

This commit is contained in:
2025-11-27 13:15:41 -05:00
parent e14ad7ad44
commit 941004f913
2 changed files with 2 additions and 2 deletions

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);