Skip to content

Commit

Permalink
Merge pull request #451 from ITPNYU/main
Browse files Browse the repository at this point in the history
Add logs for debugging
  • Loading branch information
rlho authored Oct 7, 2024
2 parents 1d5e518 + e27d963 commit 8ab6ea6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions booking-app/app/api/syncCalendars/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,9 @@ export async function POST(request: Request) {
// Update existing booking if roomIds contains multiple rooms and is different from the existing roomId
const existingBooking = bookingSnapshot.docs[0];
const existingData = existingBooking.data() as Booking;

console.log("roomIds",roomIds)
console.log("existingData.roomId",existingData.roomId)
if (roomIds.includes(',') && !areRoomIdsSame(roomIds, existingData.roomId)) {
console.log("roomIds",roomIds)
console.log("existingData.roomId",existingData.roomId)
await existingBooking.ref.update({ roomId: roomIds });
console.log(`Updated roomId for Booking ID: ${existingBooking.id}`);
totalUpdatedBookings++;
Expand Down

0 comments on commit 8ab6ea6

Please sign in to comment.