Skip to content

Commit

Permalink
Merge pull request #147 from ReflectionsProjections/divyack2-patch-1
Browse files Browse the repository at this point in the history
removed duplicate attendee /get function
  • Loading branch information
divyack2 authored Sep 10, 2024
2 parents bd01ef7 + 7bf7651 commit 60314ab
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/services/attendee/attendee-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,30 +227,6 @@ attendeeRouter.get(
}
);

attendeeRouter.get(
"/",
RoleChecker([Role.Enum.USER]),
async (req, res, next) => {
try {
const payload = res.locals.payload;
const userId = payload.userId;

// Check if the user exists in the database
const user = await Database.ATTENDEE.findOne({ userId });

if (!user) {
return res
.status(StatusCodes.NOT_FOUND)
.json({ error: "UserNotFound" });
}

return res.status(StatusCodes.OK).json(user);
} catch (error) {
next(error);
}
}
);

attendeeRouter.post(
"/redeemMerch/:ITEM",
RoleChecker([]),
Expand Down

0 comments on commit 60314ab

Please sign in to comment.