From d80690dbb091ffaab77ed35ef9df178cb5063150 Mon Sep 17 00:00:00 2001 From: yash raj Date: Sun, 18 Aug 2024 00:19:06 +0530 Subject: [PATCH] remove roles check from controller --- controllers/users.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/controllers/users.js b/controllers/users.js index 8740be33b..858212fa4 100644 --- a/controllers/users.js +++ b/controllers/users.js @@ -112,21 +112,6 @@ const getUsers = async (req, res) => { }); } - /** - * !!NOTE: At the time of writing we are only supporting the member role - * this will be fixed in the new onboarding flow, contact @tejaskh3 for more info - * - * if you're making changes to this code remove the role === 'member' check from middleware/validators/user.js - */ - if (req.query.roles === "member") { - const data = await dataAccess.retrieveUsers({ query: req.query }); - - return res.json({ - message: "members returned successfully!", - users: data.users, - }); - } - if (!transformedQuery?.days && transformedQuery?.filterBy === "unmerged_prs") { return res.boom.badRequest(`Days is required for filterBy ${transformedQuery?.filterBy}`); }