Interface change to return eventId after POST call
All checks were successful
Jenkins Production Deployment

This commit is contained in:
Patrick Müller 2022-12-26 15:58:24 +01:00
parent 65a5e91ad1
commit a34a5df5a3
Signed by: Paddy
GPG Key ID: 37ABC11275CAABCE

View File

@ -146,7 +146,10 @@ eventsRouter.post('/', async (req: Request, res: Response) => {
let eventId = await EventService.createEvent(event); let eventId = await EventService.createEvent(event);
res.status(201).send({'message': 'Event with id ' + eventId + ' was created successfully.'}); res.status(201).send({
'message': 'Event with id ' + eventId + ' was created successfully.',
'eventId': eventId
});
} catch (e: any) { } catch (e: any) {
let errorGuid = Guid.create().toString(); let errorGuid = Guid.create().toString();
logger.error('Error handling a request: ' + e.message, {reference: errorGuid}); logger.error('Error handling a request: ' + e.message, {reference: errorGuid});