Add endpoint for getting upcoming event and adding swagger docs to all endpoints
Jenkins Production Deployment
Jenkins Production Deployment
This commit is contained in:
@@ -16,6 +16,39 @@ calendarRouter.use('/events', eventsRouter);
|
||||
calendarRouter.use('/users', usersRouter);
|
||||
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /calendar:
|
||||
* get:
|
||||
* summary: Calendar API root endpoint
|
||||
* description: Returns a welcome message for the Nachklang e.V. Calendar API.
|
||||
* tags:
|
||||
* - calendar
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
* content:
|
||||
* text/plain:
|
||||
* schema:
|
||||
* type: string
|
||||
* example: Nachklang e.V. Calendar API Endpoint
|
||||
* 500:
|
||||
* description: Server error
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* properties:
|
||||
* status:
|
||||
* type: string
|
||||
* example: PROCESSING_ERROR
|
||||
* message:
|
||||
* type: string
|
||||
* example: Internal Server Error. Try again later.
|
||||
* reference:
|
||||
* type: string
|
||||
* example: 6ec1361c-4175-4e81-b2ef-a0792a9a1dc3
|
||||
*/
|
||||
calendarRouter.get('/', async (req: Request, res: Response) => {
|
||||
try {
|
||||
res.status(200).send('Nachklang e.V. Calendar API Endpoint');
|
||||
|
||||
Reference in New Issue
Block a user