From 3836ca673f1f01639902bbbdcedca5a8cbab4ac2 Mon Sep 17 00:00:00 2001 From: Christian Gawron Date: Sat, 14 Oct 2023 09:25:54 +0200 Subject: [PATCH] fix(backend): quality improvement - do not return a Promise --- backend/src/controller/event_controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/controller/event_controller.ts b/backend/src/controller/event_controller.ts index c5dd8f54..a63cc005 100644 --- a/backend/src/controller/event_controller.ts +++ b/backend/src/controller/event_controller.ts @@ -192,11 +192,11 @@ export const getEventListController = (req: Request, res: Response): void => { * @param {request} req * @param {response} res */ -export const getActiveEventsController = (req: Request, res: Response): Promise => { +export const getActiveEventsController = (req: Request, res: Response): void => { const userid = req.query.user; const query = EventModel.find({ user: userid, isActive: true }); - return query.exec() + query.exec() .then(event => { res.status(200).json(event); })