fix: remove extra comments

pull/9078/head
Agusti Fernandez Pardo 2022-04-29 17:36:25 +02:00
parent 9bb0f82075
commit c8d776aeb7
1 changed files with 3 additions and 3 deletions

View File

@ -29,9 +29,9 @@ export async function attendeeById(
// Flatten and merge all the attendees in one array
(bookings) =>
bookings
.map((bookings) => bookings.attendees) // Get the attendees IDs from user bookings
.flat() // Needed to flatten the array of arrays of all bookings attendees
.map((attendee) => attendee.id) // We only need the attendee IDs
.map((bookings) => bookings.attendees)
.flat()
.map((attendee) => attendee.id)
);
// @note: Here we make sure to only return attendee's of the user's own bookings.
if (!userBookingsAttendeeIds.includes(safeQuery.data.id)) res.status(401).json({ message: "Unauthorized" });