Skip to content

Commit

Permalink
ran linter
Browse files Browse the repository at this point in the history
divyack2 committed Sep 16, 2024
1 parent be2b70e commit 54490d4
Showing 3 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/services/attendee/attendee-router.ts
Original file line number Diff line number Diff line change
@@ -258,7 +258,7 @@ attendeeRouter.get(
async (req, res, next) => {
try {
const email = req.params.EMAIL;

const user = await Database.ATTENDEE.findOne({ email });

if (!user) {
@@ -276,7 +276,7 @@ attendeeRouter.get(
eligibleButton: user.isEligibleMerch!["Button"],
eligibleCap: user.isEligibleMerch!["Cap"],
eligibleTote: user.isEligibleMerch!["Tote"],
}
};

return res.status(StatusCodes.OK).json(merchInfo);
} catch (error) {
4 changes: 2 additions & 2 deletions src/services/attendee/attendee-schema.ts
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ export const AttendeeSchema = new Schema({
Button: false,
Tote: false,
Cap: false,
}
},
},
isEligibleMerch: {
type: new Schema(
@@ -61,7 +61,7 @@ export const AttendeeSchema = new Schema({
Button: false,
Tote: false,
Cap: false,
}
},
},

favorites: [{ type: String }],
22 changes: 14 additions & 8 deletions src/services/registration/registration-router.ts
Original file line number Diff line number Diff line change
@@ -52,16 +52,22 @@ registrationRouter.post("/save", RoleChecker([]), async (req, res, next) => {
}
});

registrationRouter.get("/emails", RoleChecker([Role.Enum.STAFF, Role.Enum.ADMIN]), async (req, res, next) => {
try {
const registrations = await Database.REGISTRATION.find();
const attendeeEmails = registrations.map((registration: any) => registration.email);
registrationRouter.get(
"/emails",
RoleChecker([Role.Enum.STAFF, Role.Enum.ADMIN]),
async (req, res, next) => {
try {
const registrations = await Database.REGISTRATION.find();
const attendeeEmails = registrations.map(
(registration: any) => registration.email

Check failure on line 62 in src/services/registration/registration-router.ts

GitHub Actions / lint

Unexpected any. Specify a different type
);

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

registrationRouter.post("/submit", RoleChecker([]), async (req, res, next) => {
try {

0 comments on commit 54490d4

Please sign in to comment.