From e27d963f215389fe8dbe8186bfe37f01234f1f23 Mon Sep 17 00:00:00 2001 From: "riho.takagi" Date: Mon, 7 Oct 2024 15:19:01 -0400 Subject: [PATCH] Add logs for debugging --- booking-app/app/api/syncCalendars/route.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/booking-app/app/api/syncCalendars/route.ts b/booking-app/app/api/syncCalendars/route.ts index 2deb47b..b04ff55 100644 --- a/booking-app/app/api/syncCalendars/route.ts +++ b/booking-app/app/api/syncCalendars/route.ts @@ -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++;