diff --git a/src/services/attendee/attendee-router.ts b/src/services/attendee/attendee-router.ts index a337000..42ad60d 100644 --- a/src/services/attendee/attendee-router.ts +++ b/src/services/attendee/attendee-router.ts @@ -163,9 +163,7 @@ attendeeRouter.get( const attendeeData = AttendeeFilterValidator.parse(req.body); const attendees = await Database.ATTENDEE.find( attendeeData.in, - attendeeData.out.map((x) => { - x: 1; - }) + attendeeData.out ); return res.status(StatusCodes.OK).json(attendees); diff --git a/src/services/attendee/attendee-schema.ts b/src/services/attendee/attendee-schema.ts index ef79517..47d9d9a 100644 --- a/src/services/attendee/attendee-schema.ts +++ b/src/services/attendee/attendee-schema.ts @@ -95,5 +95,5 @@ export const PartialAttendeeValidator = AttendeeValidator.partial(); export const AttendeeFilterValidator = z.object({ in: PartialAttendeeValidator, - out: PartialAttendeeValidator.keyof().array(), + out: z.map(PartialAttendeeValidator.keyof(), z.number().min(0).max(1)) });