From 828d5e1b56c22b2742b56d0db82c8054c7faec0e Mon Sep 17 00:00:00 2001 From: Mateo Souto Date: Tue, 23 Sep 2025 20:46:26 +0200 Subject: [PATCH] fix: Moved filtering to vote backend --- backend/controllers/group.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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