Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobc2700 committed Jul 7, 2024
1 parent 98f8709 commit 718a609
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/services/attendee/attendee-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,16 @@ attendeeRouter.get(
);

// Get attendees based on a partial filter in body
attendeeRouter.post(
attendeeRouter.get(
"/filter",
RoleChecker([Role.Enum.ADMIN]),
RoleChecker([Role.Enum.STAFF, Role.Enum.CORPORATE]),
async (req, res, next) => {
try {
const attendeeData = PartialAttendeeValidator.parse(req.body);
const attendees = await Database.ATTENDEE.find(attendeeData);
const attendees = await Database.ATTENDEE.find(
attendeeData,
"userId"
);

return res.status(StatusCodes.OK).json(attendees);
} catch (error) {
Expand Down

0 comments on commit 718a609

Please sign in to comment.