diff --git a/backend/controllers/group.ts b/backend/controllers/group.ts index d0256bf..618f9a9 100644 --- a/backend/controllers/group.ts +++ b/backend/controllers/group.ts @@ -7,7 +7,9 @@ export const getGroups = async ( res: Response ): Promise => { try { - const groups = await getAllGroups(req.body.category); + let groups = await getAllGroups(); + groups = groups.filter((group) => group.category === req.body.category); + return res.status(200).json(groups); } catch (error) { return res