Skip to content

Commit

Permalink
fix(backend): quality improvement
Browse files Browse the repository at this point in the history
- do not return a Promise<void>
  • Loading branch information
cgawron committed Oct 14, 2023
1 parent bd113bb commit 3836ca6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/controller/event_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> => {
export const getActiveEventsController = (req: Request, res: Response): void => {
const userid = <string>req.query.user;
const query = EventModel.find({ user: userid, isActive: true });

return query.exec()
query.exec()
.then(event => {
res.status(200).json(event);
})
Expand Down

0 comments on commit 3836ca6

Please sign in to comment.