Skip to content

Commit

Permalink
remove roles check from controller
Browse files Browse the repository at this point in the history
  • Loading branch information
yesyash committed Aug 17, 2024
1 parent ff2d536 commit d80690d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions controllers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down

0 comments on commit d80690d

Please sign in to comment.