#1: Add possibility to create whole-day events
Jenkins Production Deployment

This commit is contained in:
2022-12-28 12:15:01 +01:00
parent d85f9a992b
commit 93c70b0e1d
4 changed files with 34 additions and 17 deletions
+6 -3
View File
@@ -141,7 +141,8 @@ eventsRouter.post('/', async (req: Request, res: Response) => {
createdDate: new Date(),
location: req.body.location ?? '',
createdBy: req.body.createdBy ?? '',
url: req.body.url ?? ''
url: req.body.url ?? '',
wholeDay: req.body.wholeDay ?? false
};
let eventId = await EventService.createEvent(event);
@@ -194,7 +195,8 @@ eventsRouter.put('/:eventId', async (req: Request, res: Response) => {
createdDate: new Date(),
location: req.body.location ?? '',
createdBy: req.body.createdBy ?? '',
url: req.body.url ?? ''
url: req.body.url ?? '',
wholeDay: req.body.wholeDay ?? false
};
let successRows = await EventService.updateEvent(event);
@@ -245,7 +247,8 @@ eventsRouter.delete('/:eventId', async (req: Request, res: Response) => {
createdDate: new Date(),
location: '',
createdBy: '',
url: ''
url: '',
wholeDay: false
};
let success = await EventService.deleteEvent(event);